Forum Discussion

cyberblitz's avatar
cyberblitz
Icon for Helper II rankHelper II
6 years ago
Solved

Find last value by date

I am struggling to solve this. I have searched and tried numerous formulas to no avail. The dataset is thus(sorry about the formatting): District Facility Shift                 Rooms ModifiedAt ...
  • v-eachen-msft's avatar
    v-eachen-msft
    6 years ago

    Hi cyberblitz ,

     

    Based on your sample, I got the following result. Is it your expected output?

     

    Here are two measures I used.

    Max Date =
    CALCULATE (
        MAX ( 'Table'[ModifiedAt] ),
        ALLEXCEPT ( 'Table', 'Table'[Facility] )
    )
    Value =
    CALCULATE (
        MAX ( 'Table'[Beds] ),
        FILTER ( 'Table', 'Table'[ModifiedAt] = [Max Date] )
    )