Forum Discussion

shamo's avatar
shamo
Frequent Visitor
4 years ago
Solved

TOP 3 achievers

Hello!   I have data that looks like this:   Product  Sales    Week A 3 202212 B 3 202212 C   202212 D 2 202212 E   202212 F 1 202212 A 2 202216 B   20221...
  • johnt75's avatar
    4 years ago

    You can do this with a few measures. Firstly you need a ranking measure,

    Sales Ranking = RANKX( ALL('Table'[Product]), [Total Sales],,,Dense)

    and then to return the top product

    First = CONCATENATEX( FILTER( VALUES('Table'[Product]), [Sales Ranking] =1 ), 'Table'[Product], ", ")

    then the same for second and third