The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.