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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
HI,
I don't understand what is happening with my RANKX function.
I rank different zone by result (different calcul).
I do a table (down) and a Card (Up).
On the exemple, we can see all the results are right (on the left). Zone "SUD EST" is 5th.
But on the right, the table told me SUD EST is 1st, and the card graph told me 2nd... It's the same measure...
All the filters are right.
There is my RANKX measure :
Solved! Go to Solution.
Hi @chestercas ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Rank prod =
var _a=RANKX(ALL('DATA_BRMC'),'DATA_BRMC'[Prod/h log],MAX('DATA_BRMC'[Prod/h log]),DESC,Dense)
var _b=IF(ISFILTERED('DATA_BRMC'[Zone]),_a,BLANK())
return _b
(3) Then the result is as follows.
Note that this measure needs to be used with slicers when placed on a card visual, and if you only want to show the rank of [AG SUD EST], create a measure like the following and place it on the card visual.
AG SUD EST rank = CALCULATE('DATA_BRMC'[Rank prod],FILTER(ALL('DATA_BRMC'),'DATA_BRMC'[Zone]="AG SUD EST"))
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @chestercas ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Rank prod =
var _a=RANKX(ALL('DATA_BRMC'),'DATA_BRMC'[Prod/h log],MAX('DATA_BRMC'[Prod/h log]),DESC,Dense)
var _b=IF(ISFILTERED('DATA_BRMC'[Zone]),_a,BLANK())
return _b
(3) Then the result is as follows.
Note that this measure needs to be used with slicers when placed on a card visual, and if you only want to show the rank of [AG SUD EST], create a measure like the following and place it on the card visual.
AG SUD EST rank = CALCULATE('DATA_BRMC'[Rank prod],FILTER(ALL('DATA_BRMC'),'DATA_BRMC'[Zone]="AG SUD EST"))
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I analysed my database, and I think the filter on measure is not apply (it add the "no ref" value").
I tried to change "rank prod" measure, but not working... 😞
Thx
User | Count |
---|---|
98 | |
76 | |
74 | |
50 | |
27 |