Forum Discussion
Anonymous
7 years agoNot applicable
Trouble with RankX
Objective: Have a column presenting the rank of customer based on total sales in descending order Data Format: What has not worked: Ranking = ...
parry2k
Super User
7 years agoAnonymous there is detail blog post on RANK, here is link of 1 of 3. hope this helps.
- Anonymous7 years agoNot applicable
Thank you for the link.
Should I treat the Billing Customer Number as the subcategory then? Attempting based on that does seem to rank them, but not quite like I'd imagined.
DAX attempted:
Rankv4 = RANKX(FILTER(Table_1046, Table_1046[Billing Customer Number]=EARLIER(Table_1046[Billing Customer Number])), SUM(Table_1046[Extended Price]))Result:It seems to be working to some extent, but I need to figure out why the numbers are jumping around like that. I tried adding the ASC or DESC to the DAX statement, but it did not change anything. Perhaps I'm putting it in the wrong place?Rankv4 = RANKX(FILTER(Table_1046, Table_1046[Billing Customer Number]=EARLIER(Table_1046[Billing Customer Number])), SUM(Table_1046[Extended Price]),,ASC)Rankv4 = RANKX(FILTER(Table_1046, Table_1046[Billing Customer Number]=EARLIER(Table_1046[Billing Customer Number])), SUM(Table_1046[Extended Price]),,DESC)- parry2k7 years ago
Super User
Anonymous share the sample data in excel using one drive/google drive and i will send you the solution. Remove any sensitive information.
- Anonymous7 years agoNot applicable
Drive document. Thanks for your help
https://docs.google.com/spreadsheets/d/1yBowbuvQFJ0bOpWWYybjLVeRB_4B4ElTNJizBZnmc_8/edit?usp=sharing