Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 10 | |
| 7 | |
| 6 |