Forum Discussion
Dynamic Top N Ranking with Bucket-Based Filter Context
- 3 months ago
Hi Julia2023 ,
I was able to reproduce the scenario successfully using a sample dataset, and the ranking/filtering worked correctly with the shared approach.
I have attached a sample PBIX file for reference so you can compare the implementation with your current model/setup.
If the issue still exists, please share the following details -
sample data/model structure
expected output
current output screenshotso the exact filter context behavior can be reproduced and checked further.
Thank you.
Hi Julia2023 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Sorry, not working...
- v-sshirivolu3 months agoCommunity Support
Hi Julia2023 ,
I was able to reproduce the scenario successfully using a sample dataset, and the ranking/filtering worked correctly with the shared approach.
I have attached a sample PBIX file for reference so you can compare the implementation with your current model/setup.
If the issue still exists, please share the following details -
sample data/model structure
expected output
current output screenshotso the exact filter context behavior can be reproduced and checked further.
Thank you.
- v-sshirivolu3 months agoCommunity Support
Hi Julia2023 ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you
- Julia20233 months agoHelper I
Thank you! It worked. The only issue I’m facing now is that in Power BI, the Rank (Top X) measure shows different values when used as a table field versus when used as a filter. The values shown in the table are correct.
Is there a workaround to create a measure for the slicer so that it returns the same values as in the table when used as a filter as well?
Rank (Top X) = VAR _top = SELECTEDVALUE('Slicer'[Parameter]) RETURN IF( RANKX( ALLSELECTED(Product[Product]), [Actual Sales $], , DESC, DENSE ) <= _top, 1, 0 )