Forum Discussion

ajay_gajree's avatar
ajay_gajree
Helper I
6 years ago

DAX Top 1 Name

Hi all

If I have a table like

Channel. % Share Of Mentions
FB. 25
Insta. 35
Twitter. 40

Where % Share of Mentions is a written Measure, how do I write some DAX to return Twitter as the top channel based on that measure?

2 Replies

  • Hi,

    use this measure:

    Measure_1 = CALCULATE (
        MAX ( Table[Social_Name] ),
        FILTER (
            VALUES ( Sheet1[Share] ),
            RANKX ( ALL ( Table[Share] ),Table[Share],, DESC ) = 1
        )
    )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ajay_gajree ,

     

    Create a Measure =

     

    RANKX( ALL('Table'[Channel]), [%Share of Mention] , ,DESC)

     

    Then put a visual filter on rank=1

     

    Regards,

    Harsh Nathani