Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I have a requirement to show top 20 values in a table.
For that I have used RANKX function. Code below.
This gives me the correct ranking based on the field volume.
But, after I apply Top 20 filter, the ranking is incorrect. The Ranks are repeated and the values are not in the expected order.
This is happening due to the RL12 filter.
I am only including data where RL12="Y". There are other visual filters as well.
So, where ever there are no records for RL12=Y, the rank is getting skipped.
Could someone please suggest on how this can be fixed and show all the ranks in order without any repetition.
Thank you
Poojitha
@tamerj1 : Tried ALLSELECTED as well, and the results are same as ALL.
The results are not as expected
@poojithas
Ok. Please try
Rank =
RANKX (
CALCULATETABLE (
SUMMARIZE ( NTN_GRAPHS, NTN_GRAPHS[GRANDPARENT], NTN_GRAPHS[GRANDPARENT] ),
ALLSELECTED ()
),
[Volume (k1)]
)
@tamerj1 : Thanks for the quick response. I have tried the above logic and the results are again same as before . Please find the screenshot below:
@tamerj1
There was a visual filter for the field "Type" where the logic was concatenate(comments,ntn/non-ntn) and this had the output as below: I was restricting this to only show Regular NTN and Premium NTN.
Regular NTN |
Regular Non-NTN |
PremiumI NTN |
Premium Non-NTN |
Non-Premium NTN |
Non-Premium Non-NTN |
I created another column with the logic as if type=Regular NTN and Premium NTN then include else exclude. I used this field instead of TYPE in the visual filter. This fixed the issue with Ranking.
Thanks for the responses.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |