Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
-Measure
Kosten = CALCULATE(SUMX(Behandeling,RELATED(Specialisten[Kostprijs])*Behandeling[Duur]))
-Measure
DuursteWN = RANKX(TOPN( 10, ALLSELECTED(Werknemers), MeasureTable[Kosten], ASC, Werknemers[Werknemer], ASC), MeasureTable[Kosten])
Solved! Go to Solution.
@Anonymous , Not sure what you are trying using thtat
Try TOPn like
DuursteWN = calculate([Kosten]TOPN(10,allselected(table[Werknemers]),[Kosten],DESC), values(table[Werknemers]))
Or Rank like and then use visual level filter
DuursteWN = RANKX(ALLSELECTED(Werknemers), MeasureTable[Kosten],,desc, desnse)
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
TOPN: https://www.youtube.com/watch?v=QIVEFp-QiOk&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=42
Hi @Anonymous ,
I found an article that explains this question:
"The RANKX() function ranks individual data rows according to a certain ranking attribute. It’s result is a numerical value associated with each and every single row of the data table.
Although the TOPN() function sounds the same,it does not return a value for each row in the data table. It returns a table that contains the top N items (N is the number you specified in the first argument) from the original data table according to the ranking attribute you specified.
In itself this is pretty useless, since you cannot display this data in any way. If you could it would be an alternative way to get a top N ranking to RANKX.
To make TOPN useful you need to wrap it in another function, such as SUMX or AVERAGEX.“
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Not sure what you are trying using thtat
Try TOPn like
DuursteWN = calculate([Kosten]TOPN(10,allselected(table[Werknemers]),[Kosten],DESC), values(table[Werknemers]))
Or Rank like and then use visual level filter
DuursteWN = RANKX(ALLSELECTED(Werknemers), MeasureTable[Kosten],,desc, desnse)
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
TOPN: https://www.youtube.com/watch?v=QIVEFp-QiOk&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=42
Hi,
Thanks for the help. I think I can get most of my things fixed with your second solution!
I still have a questions. After reading those articles and docs from windows I still do not understand something.
Why does the TOPN not work in RANKX? I don't want to make similar mistakes in the future.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |