Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a matrix with a list of restauraunt locations based on the City in the Selection Slicer.
Trying to accomplish two things:
1.) Only want to see Rankings when a restaurant is selected [in the screenshot below, if the user deselected the restaurnat location then the "Location Rank in City" would go away/disapper; and,
2.) Trying to figure out how to rank the restaurant against all locations in the State.
This measure provides the ranking within the Selected City ->
Thank you!
Solved! Go to Solution.
Hi @AaronGlenn10 ,
Please try the following formula:
Location Rank in State =
CALCULATE (
[Location Rank in City],
REMOVEFILTERS ( TABC[City] ),
KEEPFILTERS ( TABC[State] = MAX ( TABC[State] ) )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AaronGlenn10 ,
Please try the following formula:
Location Rank in State =
CALCULATE (
[Location Rank in City],
REMOVEFILTERS ( TABC[City] ),
KEEPFILTERS ( TABC[State] = MAX ( TABC[State] ) )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you.
The rank for LOCATION within a CITY [e.g., #5 in the City of Dallas] works great, however, still can't resolve how to rank the LOCATION within the ENTIRE STATE of TEXAS. Any guidance would be much appreciated.
@AaronGlenn10 , Try measures like
Rank = Rankx (ALL(TABC[Location Name/City/Number]), [TABC Sales (CY)])
Location Rank in City = if(isfiltered(TABC[Location Rank in City]), [Rank], blank())
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |