Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to get top rank to get my top 3 of both cordinators and officers for each month.
RANKX(ALLSELECTED(mytable),CALCULATE(SUMX(SUMMARIZE(mytable,mytable[cordinator],mytable[officers],mytable[cordinator]))
Cordinator | Officers | month | Value |
Sandra | Andy | 1 | 100 |
Sandra | Andy | 2 | 150 |
Sandra | Sam | 1 | 100 |
Sandra | Sam | 2 | 110 |
Peter | Julie | 1 | 300 |
Abby | liam | 1 | 200 |
Abby | Liam | 2 | 150 |
Solved! Go to Solution.
@Anonymous
Here is a way of doing it:
1) I've created a model based on your data, including lookup tables which I use in both the measures and the visuals:
2) The measures (note that the column references are to the lookup tables; I also use this column in the actual measure)
Rank Coordinator =
VAR calc = RANKX(ALLSELECTED(Coordinator[Cordinator]);
[Sum of values]; ;DESC;Dense)
RETURN
IF(ISINSCOPE(Coordinator[Cordinator]); calc; BLANK())
Rank Officers =
VAR calc = RANKX(ALLSELECTED(Officers[Officers]);
[Sum of values]; ;DESC;Dense)
RETURN
IF(ISINSCOPE(Officers[Officers]); calc; BLANK())
And here is the result:
You can use the filter pane to filter out blanks and to limit the rank to top "n"
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
Here is a way of doing it:
1) I've created a model based on your data, including lookup tables which I use in both the measures and the visuals:
2) The measures (note that the column references are to the lookup tables; I also use this column in the actual measure)
Rank Coordinator =
VAR calc = RANKX(ALLSELECTED(Coordinator[Cordinator]);
[Sum of values]; ;DESC;Dense)
RETURN
IF(ISINSCOPE(Coordinator[Cordinator]); calc; BLANK())
Rank Officers =
VAR calc = RANKX(ALLSELECTED(Officers[Officers]);
[Sum of values]; ;DESC;Dense)
RETURN
IF(ISINSCOPE(Officers[Officers]); calc; BLANK())
And here is the result:
You can use the filter pane to filter out blanks and to limit the rank to top "n"
Proud to be a Super User!
Paul on Linkedin.
Do you want to combine ranking? Can you explain in details?
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
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
Top 3 inside each category
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |