Forum Discussion

SVM9698's avatar
SVM9698
Regular Visitor
2 years ago
Solved

DAX Time Intelligence

Hi All,   I have a question related to Month To Date,Quater To Date and YearTo Date dax formulas , in my current project we are dealing with data which has only month numbers related to date inform...
  • JoeBarry's avatar
    JoeBarry
    2 years ago

    Does the Volume table only have data from a certain year or is there many years in it? If it is just for one year and it's the current year, then in power query add a custom column called Date to the volume table. 

    "01/" & [Periodo 445] & "/2023"

     

    Convert to Date.

     

    Create a new date table 

    Date Table = = CALENDAR (MINX (Volume, [Date]), MAXX (Volume, [Date]))

    You can other columns using the FORMAT Function. This will give you all dates between the Min and Max dates of your Volume table.

     

    Create the relationship as above. One to many on the date column in the date table to the date column in the Volume table. 

     

    Then you can create the Time Intelligence measures

     

    MTD = TOTALMTD(SUM(Volume[Amount]), 'DateTable'[Date])

     

     

    Thanks

    Joe