Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

RankX function with Slicers returning different values

Hello guys, Im newbie here, Im searching for a while for this solution but I cant help myself.

 

Ive used this tutorial for making a pareto diagram https://powerbi.tips/2016/10/pareto-charting/ , but I have 4 slicers instead of 2 like in this tutorial. I have problem with RankX function beacuse when I use it like this

Ranking = RANKX(  'Summary',   'Summary'[Sum Sales])

and change the slicers I get good ranking order but it keeps giving me ranking from global. So when I change slicers I get something like this 

Items  Model    Ranking  

Item 1 Model 1 5

Item 2 Model 3 8

Item 3 Model 5 13

 

instead of 1,2,3. Can someone help me with this measure ? Ive tried it with AllExpect or with SUMX,SUM and different kind of variation and usually I got the same ranking as before or just ranking where every column returned 1.