Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi friends,
I would like to rank our clients based on their contribution in each region. Therefore, Each Client should have their own rank in each region. Here is my DAX:
The result didnt correct as I expect.
Any help is highly appreciated.
Solved! Go to Solution.
Hi, @tracytran91
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Client Rank =
IF(
ISINSCOPE('Table'[Client Name]),
var c = SUM('Table'[%Count])
var clientrank =
RANKX(
ALLEXCEPT('Table','Table'[Location Definition]),
CALCULATE(SUM('Table'[%Count])),
,,Dense
)
var result =
IF(
NOT(ISBLANK(c)),
clientrank
)
return
result
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @tracytran91
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Client Rank =
IF(
ISINSCOPE('Table'[Client Name]),
var c = SUM('Table'[%Count])
var clientrank =
RANKX(
ALLEXCEPT('Table','Table'[Location Definition]),
CALCULATE(SUM('Table'[%Count])),
,,Dense
)
var result =
IF(
NOT(ISBLANK(c)),
clientrank
)
return
result
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@tracytran91 , not very clear based on screen shot. refer for category rank in the link
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://www.youtube.com/watch?v=DZb_6j6WuZ0
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
122 | |
80 | |
47 | |
44 | |
35 |
User | Count |
---|---|
183 | |
84 | |
69 | |
48 | |
45 |