Forum Discussion

hemann's avatar
hemann
Icon for Helper I rankHelper I
4 years ago
Solved

Rank to filter on this visual

Hi, I want to create a top 5 rank for the below data on series. I am able to do this using RANKX and count quantity. Problem is I want to exclued "Not Specified" from my rank calculation to get belo...
  • amitchandak's avatar
    4 years ago

    hemann , Try like

    Rank Top 5=RANKX(Filter( ALL(Table[Series]), Table[Series] <> "Not Specified"),CALCULATE(COUNT(TABLE[Quantity]))

     

     

    or try TOPN

    CALCULATE(COUNT(TABLE[Quantity]),TOPN(5,Filter( ALL(Table[Series]), Table[Series] <> "Not Specified"),CALCULATE(COUNT(TABLE[Quantity])) ,DESC),VALUES(Table[Series]))