Forum Discussion
prashant21
3 years agoNew Member
Help with RANkX Function
I am trying to write the DAX to get a ranking of stores based on sales. The code provided calculates the rank of stores based on their total weekly deals in the 'sales data-set'. But i am geting the...
- 3 years ago
Hi, Still getting the same issue
prashant21
3 years agoNew Member
Himlsx4, Could you please let me know why it was necessary to add 'sales data-set'[Store] instead of 'sales data-set'?
mlsx4
Memorable Member
3 years agoOh, I have used ALLSELECTED instead of ALL (It was a try).
I have seen that it doesn't work. What have you written in the measure [Sum of weekly..]?
It is something silly but using dummy data it works...can you try to do this?
Rank of Stores =
RANKX
(
ALL('sales data-set'), -- Replace 'Stores' with the appropriate table name
CALCULATE (SUM ('sales data-set'[column])),
,DESC
,Dense
)