Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Difference between MAX date and another date

Hi folks,   I am struggling with a DAX expression to get the difference between the max date in a slicer and the date of the invoices, I mean:   I have a table with clients, invoices and dates: ...
  • v-eachen-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    You could create two measures to get it.

    max date =
    MAXX ( ALLSELECTED ( 'Date'[Date] ), 'Date'[Date] )
    
    Days =
    DATEDIFF ( SELECTEDVALUE ( 'Table'[Date] ), [max date], DAY )

    Here is the result.

    Here is my test file for your reference.