Forum Discussion
rajivraina
Helper II
7 years agoRanking data across multiple categories within same column
Hi, I have a table of data that has macroeconomic data on countries over a period of years. I am trying to assign a rank to each country based on their value, while still taking into account the ...
Zubair_Muhammad
Community Champion
7 years agorajivraina
Helper II
7 years ago
Zubair_Muhammad wrote:
Could you copy paste sample data or share your file?
Zubair_Muhammad I don't seem to have an option to attach files directly on this forum, so I have uploaded it to file sharing service "filedropper", here is the link: http://www.filedropper.com/data1
Let me know if you need anything else.
- Zubair_Muhammad7 years ago
Community Champion
Try this MEASURE.
See the attached file as well with your sample data
Measure = RANKX ( CALCULATETABLE ( Table1, ALLEXCEPT ( Table1, Table1[ Grouping ], Table1[ Indicator ], Table1[ Year ] ) ), CALCULATE ( SUM ( Table1[ Value ] ) ), , DESC, DENSE )- rajivraina7 years ago
Helper II
Zubair_Muhammad wrote:Try this MEASURE.
See the attached file as well with your sample data
Measure = RANKX ( CALCULATETABLE ( Table1, ALLEXCEPT ( Table1, Table1[ Grouping ], Table1[ Indicator ], Table1[ Year ] ) ), CALCULATE ( SUM ( Table1[ Value ] ) ), , DESC, DENSE )Zubair_Muhammad This is the result for me...it looks like it is ranking correctly according to the value but it is not taking into account Year or Grouping or Indicator. The highest rank should be around 200-300 as that is the max # of countries. Any idea what's going on?
- Zubair_Muhammad7 years ago
Community Champion
Could you share file or full data