Forum Discussion
maurcoll
2 years agoHelper IV
Rankx and sort
Good Afternoon I am using the following formula to rank store sales, by store and region. Store Ranking % sales = RANKX ( ALL(Region[Store]), [% Sales], , ASC, Dense) Store Ranking ...
- 2 years ago
Hello maurcoll,
Can you please try this DAX:
Store Ranking % sales (ASC) = RANKX( FILTER(ALL(Region[Store]), [Measure for % Sales] > 0), [% Sales], , ASC, Dense )
Sahir_Maharaj
2 years agoSuper User
Hello maurcoll,
Can you please try this DAX:
Store Ranking % sales (ASC) =
RANKX(
FILTER(ALL(Region[Store]), [Measure for % Sales] > 0),
[% Sales], , ASC, Dense
)
maurcoll
2 years agoHelper IV
Good morning,
That is working for the majoirty it is only when i have a store with 0 sales that it is giving this store and the next store a ranking of 1, when all stores have sales it is working perfectly. Ideally i would like the 0% to be 1 and then the next store to show as 2. I have tried changing from skip to dense but this does not seem to make any difference. Thank you for your help
| Store | % Sales | Ranking |
| A | 1% | 1 |
| B | 0% | 1 |
| C | 1.5% | 2 |