Forum Discussion

ganchevd's avatar
ganchevd
Icon for Helper I rankHelper I
8 years ago
Solved

Difference between due date and selected calendar date

Hello,   I have an issue by making the calendar slicer affect the days overdue. From the table bellow:   Customer name Cust No. Document date Document No.: Due date Invoiced Ending balan...
  • Greg_Deckler's avatar
    8 years ago

    You would need to create a measure, which should be something like:

     

    Measure = 
    VAR MaxDate = MAX('Calendar'[Date]) // Or MAXX(ALLSELECTED('Calendar'),[Date])
    VAR DueDate = MAX('Table'[Date])
    RETURN DATEDIFF(MaxDate,DueDate,DAY)