Forum Discussion

samnaw's avatar
samnaw
Resolver I
3 years ago

Top Three (Text)

Hello:

 

I have a pivot table in my dashboard like this:

 

* there are like 24 stores. 

store_nameShare Of Sale
Store 145.34%
Store 241.45%
Store 337.22%
Store 435.62%
Store 534.73%

 

I would like a DAX formula that would output me only the "Top 3 Store" based on Share of Sales. Share of Sales is already a DAX formula (i.e Subscription Sales/Total Sales)

 

The output should look like this:

Rankstore_name
1Store 1
2Store 2
3Store 3

 

Not sure how to go about doing this. 

2 Replies

  • Mikelytics's avatar
    Mikelytics
    Resident Rockstar

    Hi samnaw 

     

    Do you want a measure is the following approach also fine? Has the advantages that you dont need additional measures.

     

     

     

     

    Best regards
    Michael
    -----------------------------------------------------
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Appreciate your thumbs up!
    @ me in replies or I'll lose your thread.

     

     

     

  • Mikelytics's avatar
    Mikelytics
    Resident Rockstar

    Hi samnaw 

    another option with measure would be this:

     

    RANK | Rank of Item = 
    RANKX(
        ALL(Dim_Product),
        [Aggregation | Sum]
    )

    After putting the table in the visual you can sort the column with 1,2,3

     

    Best regards
    Michael
    -----------------------------------------------------
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Appreciate your thumbs up!
    @ me in replies or I'll lose your thread.