Forum Discussion

CREsearch's avatar
CREsearch
Frequent Visitor
6 years ago
Solved

Return nth ranked value based on criteria

In the below dataset I have a column that ranks the order/position of a value within a grouping. I'm trying to find a dax function that will allow me to return the nth largest value based within a gi...
  • Icey's avatar
    Icey
    6 years ago

    Hi CREsearch ,

    Try this:

    SwapRank 2 = 
    RANKX (
        FILTER ( 'Table', 'Table'[Address] = EARLIER ( 'Table'[Address] ) ),
        'Table'[Rank],
        ,
        DESC,
        DENSE
    )

     

    Best Regards,

    Icey

     

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