Forum Discussion

jakeryan56's avatar
jakeryan56
Icon for Advocate II rankAdvocate II
4 years ago

Latest Record by Date

I need to pull the latest "note" based on the "note_time" field.

Can someone share the best dax to use for this?

This can be either a measure or calcualted column in my fact_case table

3 Replies

  • Hi jakeryan56 

     

    Try this measure:

     

    Latest Record = 
    VAR _Lastdate =
        MAX ( fact_case[note_time] )
    RETURN
        CALCULATE (
            MAX ( fact_case[note] ),
            FILTER ( fact_case, fact_case[note_time] = _Lastdate )
        )

     

     

    output:

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos✌️!!