Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
42 | |
33 | |
30 | |
18 | |
18 |