Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX Query for Getting a filtered value

I need the DAX query to get the below measure or calculated column. How to achieve ?   Get StatusName from ActionTable WHERE Action_Date = MAX(Action_Date) and Status != 17
  • AlB's avatar
    5 years ago

    Hi Anonymous 

    Place this measure in a card visual:

    GetStatusName =
    VAR maxDate_ = MAX ( ActionTable[Action_Date] )
    RETURN
        CALCULATE (
            DISTINCT ( ActionTable[StatusName] ),
            ActionTable[Action_Date] = maxDate_,
            ActionTable[Status] <> 17
        )

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.