Forum Discussion
Time Intelligence Functions (DAX)
Can you give me a hint ?
pcena_bd_last30days2 = CALCULATE(SUM(movement[pcena]); movement[datum]>NOW()-30; movement[datum] <= NOW())
I tried to rewrite this with function datesbetween, but It did not work.
pstanek In order to use time intelligence functions you need to have a date table related to your fact table. It would appear in your DAX function that you are referencing the same table.
- pstanek10 years agoPost Patron
Is it the table with only one column --dates ?
- Anonymous10 years agoNot applicable
It can have as many columns as you like but it needs one column with an unbroken range of dates (i.e. every date within the range with no dates skipped). People frequently add other columns such as Month and Year in order to use those groupings in their visuals, but that depends on your goals with this.
- Anonymous10 years agoNot applicable
pstanek Here is a thread which describes how to create a dynamic data table in PBI. It is a table that relates to a date in your fact table, and allows you to filter on other date parts (YR, MO, etc).
http://community.powerbi.com/t5/Desktop/Possible-Tip-Trick-Dynamic-Date-Dimension-Table/td-p/8462
There are numerous other examples out there.