Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Difference between two dates in a measure

Hello everyone! I have the following measure: MaxDate = CALCULATE(MAX(Mastercalendar[Date]),filter(Mastercalendar,Mastercalendar[Weekday]<=5))   The objective is to give me the maximum date o...
  • Anonymous's avatar
    Anonymous
    8 years ago

    The error was I needed to clear some other filters from the mastercalendar.
    This works:

    CALCULATE(CALCULATE([occurrences],
    FILTER(Table,([MaxDate]-uvw_GBS_KPIs_HR_v2[opened_at])*1>15&&
    ([MaxDate]-Table[LT_opened_at])*1<=30)),ALL(Mastercalendar))
    /[occurrences]+0