The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a table visual with the following columns, participant name(group), allocation no, outstanding balance. I need to rank the participant name(group) based on outstanding balance (desc order), but the same rank to be given to the same participant name. for example, if the participant A has two allocation no, then both the rows should be ranked as 1(or same rank).
@amitchandak
Solved! Go to Solution.
Hi @archana_c ,
You can create a measure as below to get it, please find the details in the attachment.
rank =
RANKX (
ALLSELECTED ( 'Table'[participant name] ),
CALCULATE (
MAX ( 'Table'[outstanding balance] ),
ALLEXCEPT ( 'Table', 'Table'[participant name] )
),
,
DESC,
DENSE
)
Best Regards
Hi @archana_c ,
You can create a measure as below to get it, please find the details in the attachment.
rank =
RANKX (
ALLSELECTED ( 'Table'[participant name] ),
CALCULATE (
MAX ( 'Table'[outstanding balance] ),
ALLEXCEPT ( 'Table', 'Table'[participant name] )
),
,
DESC,
DENSE
)
Best Regards
Thank you for the solution. Its working fine.
Is it possible to remove rows with 0 values if there are no negative values,(need to keep the rows with 0 if there are negative values) Because i am using this measure inorder to get the top 5 list(as well as bottom 5). But if there are more than one participant with 0 value, its ranked the same and if the rank is below 5 then all are listed. Let me know if any condition can be added in the dax.
Thank you
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
264 | |
120 | |
115 | |
83 | |
70 |