Forum Discussion

learning_dax's avatar
learning_dax
Helper II
4 years ago
Solved

Time Intelligence (Beginner Help Please!!)

Hi all,  Loving Power BI & Dax. New user here picking things up quickly but struggling in some areas compared to others. However, time-intelligence functions (MTD, PREVIOUSMONTH, DateAdd) have not...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi learning_dax ,

     

    I think your dax code is correct. The issue should be caused by your date table. How did you get your Date table, by Enter Data or calculated table by calendar/calendarauto dax function? To succeed to use time intelligence, please make sure your date table has continuous dates in it. I suggest you to use calendar/calendarauto dax function to create a date table with continuous dates. 

    For reference: Create date tables in Power BI Desktop

    Below screenshot is my test result. Top table show the correct results based on continuous date table. Below one show incorrect result based on uncontinuous date table.

    You may download my sample to learn more details.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.