As part of the core setup, several default time dimensions are already configured for you. These default dimensions are based on SQL queries. However, if you need additional time dimensions for your analysis, you can easily create and configure them.
Creating new time dimension:
Create a new dimension
On the 'Settings' tab, check the 'Universal' box
Enter the appropriate SQL query for your time dimension in the provided field.
SQL Queries:
Date:
βDATE_FORMAT({DATE_SQL}, '%Y-%m-%d (%a)')
Day of Week:
DAYNAME({DATE_SQL})
Week Commencing:
CONCAT ('w/c ',DATE_FORMAT(FROM_DAYS(TO_DAYS({DATE_SQL}) - MOD (TO_DAYS({DATE_SQL}) -2, 7)),'%Y-%m-%d (%a)'))
Month:
MONTHNAME({DATE_SQL})
Quarter:
CONCAT('Q', QUARTER({DATE_SQL}))
Year:
YEAR({DATE_SQL})
Year Month:
DATE_FORMAT({DATE_SQL}, '%Y - %M')
Year Quarter:
CONCAT('Q', QUARTER({DATE_SQL}), ' ', DATE_FORMAT({DATE_SQL}, '%Y'))