Forum Discussion

yazenbarakat123's avatar
4 years ago
Solved

Time intelligence Function

Hello All!    Im currently trying to write a Dax query to retrive the  "Current Date" for the previous month in a scheduling Report.      Each Scheduled acticty has a Baseline date and a current...
  • johnt75's avatar
    4 years ago

    You could create a measure like

    Previous Month =
    LOOKUPVALUE (
        'Table'[Current Month],
        'Table'[Activity ID], SELECTEDVALUE ( 'Table'[Activity ID] ),
        'Table'[Reporting date], EOMONTH ( SELECTEDVALUE ( 'Table'[Reporting Month] ), -2 ) + 1,
        BLANK ()
    )