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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello,
I am using RANKX function to create a "heatmap" of sorts that conditionally formats the metric card based on its rank.
Items ranked 1 would be green, items in the middle yellow, end red. All on a gradient.
I noticed one item which was below average was green. I put together a table, and it had it's rank (correctly) as 13th, which should have indicated a reddish color.
However, when I selected just that item, it's rank went to 1. This is the only dimension I found that this applied to. If I clicked any of the other Metric Card Names, it kept the correct rank.
The formula I have is:
RANKX(
ALL(Table[Metric_Card_Names]),
calculate(sum(Table[events])),,DESC)
I'm super confused, as it seems to handle it fine in all circumstances except the way I need it.
hi @bennum
try like:
RANKX(
ALLSELECTED(Table[Metric_Card_Names]),
calculate(sum(Table[events])),,DESC)
The problem with allselected is that really messes with the second scenario where I'm trying to get it's rank within the group on a metric card. With all selected, as soon as I narrow it to the single item in the filter it would reduce the whole list to that item.
Hi,
Share the download link of the PBI file.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.