Forum Discussion
Removing Ranking Duplicates
Anonymous - firstly you need to include all columns from your visual in the ranking, this is what is causing your duplication, secondly I would suggest putting the filtering on the visual and taking it out of the ranking. Please try the code below:
RANKX (ALLSELECTED('Table1'[SubCat], 'Table1'[Group]),[Totalvols],,DESC)
If you find you still need the filtering, you can use the ALLSELECTED from my code, rather than the ALL from yours.
If this works, please accept this as the solution, if it does not, please supply some sample data for me to test.
Sadly this is now ranking across all columns rather ranking for each individual column. I will try and provide sample data, but need to remove sensitive data first.
- mark_endicott2 years ago
Super User
Anonymous - Sorry for the late response, I have been travelling a lot the last 2 days.
I misread your challenge the first time, so my code was not going to work for you, sorry about that.
Having seen your screenshot, I can see why you have duplicate rankings. In group 1 you have 3 [Totalvols] of 89, 3 [Totalvols] of 117 and 3 visible 153's.
These will all be producing duplicate ranks because they have the same value. If you want them to have different ranks, you need to provide another measure to break the ties.
- Anonymous2 years agoNot applicable
Hi,
These are not the volumes, this is the output of your code. There are very few rows that have the same volumes- mark_endicott2 years ago
Super User
I see, then we still need some sample data to understand why you are getting duplicates.