Forum Discussion
How do i create a date table ?
PeterBI You have a semi-colon where you should have a comma before "DATE(". In addition, to create this you need to click on "Modeling" - "New Table" and input the code in Table = CALENDAR(DATE(2012,01,01),DATE(2017,06,30))
Hello,
I have created the date table following your tips and instructions. However when I use the DateKey table in Quick Measure Calculations I receive following error:
Net Revenue YoY% =
IF(
ISFILTERED('DateKey'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
VAR __PREV_YEAR =
CALCULATE(
SUM('Project Details_USD'[Net Revenue]),
DATEADD('DateKey'[Date].[Date], -3, YEAR)
)
RETURN
DIVIDE(
SUM('Project Details_USD'[Net Revenue]) - __PREV_YEAR,
__PREV_YEAR
)
)
Where do I go wrong? I am not a DAX person, so I copy/paste formulas. I really need to get he Power BI-provided date hierarchy going as I do a lot of reporting using Time Intelligence. I was using Pivot Tables and Tableau Quick Table Calculations.
Thank you in advance,
Petek