Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello guys.
I bet it is a simple fix, but I can't quite figure it out.
So I have the Rankx:
Ranking categoria = RANKX(ALL(Folha[Categoria]),[Vantagem])Everything works fine so far.
However, when I use the slicer, the ranking order changes. For example: the "aposentados" goes from 2nd to 3rd place as shown below:
Any help?
Solved! Go to Solution.
@alportela
TBH, nothing mate.
I changed the method, and used calculated columns rather than Measure.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @alportela
Is [Vantagem] a measure? or column name? if it's a measure can you share a formula with a sample of your data?
BTW, try this:
Ranking categoria = RANKX(ALL(Folha),[Vantagem])
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hello.
Sorry, it is my first post.
[Vantagem] it is a measure.
Vantagem = SUMX('Folha',[Fixa]+[Eventual]+[Função]+[Cet]+[Variável]+[Indenização])
I tried your suggestion, but it did not work
Ranking categoria = RANKX(ALL(Folha),[Vantagem])
Sample data: http://bit.ly/alpimprimir
Do you use columns from one table in matrix and slicer?
I think your first dax code should works fine unless there is something that is not clear here. Can you share your PBIX file?
download this file: https://gofile.io/d/F9woxk
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Check this file:
Download link: https://gofile.io/d/To94by
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Awesome, man. It works. Thanks a lot.
What did I do wrong?
@alportela
TBH, nothing mate.
I changed the method, and used calculated columns rather than Measure.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
@alportela I checked the file and it looks to me like this is a floating-point accuracy error rather than anything wrong with the DAX.
As a workaround, you can fix the problem by rounding using INT.
Ranking categoria = RANKX ( ALL ( Folha[Categoria] ), INT ( [Vantagem] ) )
As a side note, I'd recommend using calculated columns for ranking unless the rank needs to be dynamic (which is rather common).
It does not affects performance?
Well, in a simple way, Measure use CPU and Calculated Column use Ram [memory] 🙂
If you use Calculated column that will increase your file size az well.
In you file it's not different (it's not a big [1GB or more])
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 18 | |
| 12 | |
| 11 |