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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to get the top 5 Marks for the years 2021 and year 2022.
Here is the problem statement:
When I am selecting an Individual year, I am getting the top 5 marks from the table, but when I am selecting both year from the Slicer, I am not getting the expected output. I am using the TOP N filter from the Filter panel for Marks.
Note: I have 1000+ rows like this in the real dataset, this is just for the sample.
My expected output would be-
Thanks
Solved! Go to Solution.
Hi, @amikm
According to your description, I think you can create a measure and use it in filter pane to display the top 5.
Like this:
Top5 =
RANKX (
SUMMARIZE ( ALLSELECTED ( 'Table Top' ), [Year], [Name] ),
CALCULATE ( SUM ( 'Table Top'[Marks] ) ),
,
desc,
DENSE
)
Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
Hi, @amikm
According to your description, I think you can create a measure and use it in filter pane to display the top 5.
Like this:
Top5 =
RANKX (
SUMMARIZE ( ALLSELECTED ( 'Table Top' ), [Year], [Name] ),
CALCULATE ( SUM ( 'Table Top'[Marks] ) ),
,
desc,
DENSE
)
Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
@amikm , Assume you have measure marks, Create rank like this
rankx(filter(summarize(allselecetd(Table), Table[year], Table[name]), [year] = max([year])), [marks],,desc,dense)
if you need across year
rankx(summarize(allselecetd(Table), Table[year], Table[name])), [marks],,desc,dense)
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 46 | |
| 42 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 196 | |
| 127 | |
| 102 | |
| 67 | |
| 49 |