Forum Discussion
Jos13
Helper III
6 years agoRANKX not working as expected
Hi All, I have a measure to rank staffs based on sales as follows : Rank_Sales = RANKX(ALLSELECTED('Table'[Staff]),[Sales_],,DESC) I also have a month filter. When I filter a month for example ...
- 6 years ago
Hi Jos13 ,
The Rank is working correctly, the users with no sales are ranked last, makes sense to me. what you need to do is exclude them from the rank function
like so
Rank_Sales = if(sum('Table'[Sales]) <> BLANK(), RANKX(ALLSELECTED('Table'[Staff]),[Sales_],,DESC), BLANK())Hope this Helps
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
richbenmintz
Resident Rockstar
6 years agoHi Jos13 ,
The Rank is working correctly, the users with no sales are ranked last, makes sense to me. what you need to do is exclude them from the rank function
like so
Rank_Sales = if(sum('Table'[Sales]) <> BLANK(), RANKX(ALLSELECTED('Table'[Staff]),[Sales_],,DESC), BLANK())
Hope this Helps
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
- Jos136 years ago
Helper III
Thank you richbenmintz . That worked for me.