Forum Discussion
Rank for particular years
i created like the image you posted
Rank_dimension = RANKX(ALL('table'[Country]),'table'[Country])
iam getting the different ranks. upto this fine
now i need the rank for 2 years
example 2016 and 2012
2012_rank = CALCULATE(SUM([Rank_dimension]),FILTER('table','table'[Year]=2012))
2016_rank = CALCULATE(SUM([Rank_dimension]),FILTER('table','table'[Year]=2016))
i am getting same rank for both years
can you suggest me how to approach this issue
thanks
Hi
It might the same number of rows for both the Year.
In the below screenshot, if you take the Rank_dimension, it has the same number of values because it has same 4 entries. In case if you have a different number of rows then you will get different values.
To show that, I created another 2 column 2012Yr & 2013Yr with RankYear column and it shows 4 & 8 values.
- arulsettu9 years agoFrequent Visitor
Thanks for the reply
but i have different values for 2012 and 2016
even getting same rank
can you please explain how its defininig the rank
Rankx(All(table[country],table[copuntry]))
here we are not passing any values right. how its bringing the rank
and why i am getting same rank
Thanks
- arulsettu9 years agoFrequent Visitor
This is the output i am getting
can you see china has different values for 2016 and 2017 but getting same rank
can you help me on this
- Anonymous9 years agoNot applicable
Hi arulsettu,
Please sort your data by year, the different value with same rank mean they have same rank in different category.
Regards,
Xiaoxin Sheng