Forum Discussion

yve214's avatar
yve214
Helper III
4 years ago
Solved

Most Recent Discharge Date Row Record

Please how can I get the most recent row values if I have a sample data like this.    I used the calculate and filter allexcept function but I got only the dates and not the corresponding Ids.  Ta...
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    I assume you want to create a measure.

    Please check the below picture and the attached pbix file.

     

    Date record ID max date: =
    IF (
        HASONEVALUE ( Data[patient_name] ),
        CALCULATE (
            MAX ( Data[record_Id] ),
            FILTER ( Data, Data[discharge_date] = [Discharge max date:] )
        )
    )