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.
-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.
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
27 | |
12 | |
12 | |
12 | |
6 |