Recently one of my business users came to me asking “how can I get a Clickable Card in Power BI”? He wants a card where he can show the measured value, but when he clicks on that, he wanted to cross filter other visuals. To be fair, A valid ask, but not something I have done before. After deep thought, I came up with a work around, so thought to write a quick blog post for future reference.
Let’s understand the need, assume we are looking at Products data, and this is how report looks like
In the above report, if we have 50000 rows instead of 5, it would be difficult to find those two products which are causing significant loss. Of course, we can click on the chart on the right and interact, but that’s not the point here. So how can we make that card clickable? Well, for now, we don’t have an inbuilt clickable visual. So the question is how can we get something which looks like the card but interactive. (I am sure there are several ways of doing this, but I have gone for Treemap visual.)
Let’s see how I created a Clickable Card:
First I created a calculated table
SUMMARIZE ( Products, Products[Product] ),
"LossCount", CALCULATE ( COUNT ( Products[Profit/Loss] ), Products[Profit/Loss] = "L" )
Products[Profit/Loss] = "L"
Then I created a relationship between Products table and a new Loss table, also I have hidden LossTable for users.
Replaced existing card with a treemap, Product column on Group and Sum of Loss count on values. As I had same values for all rows in Prod column, as expected there was only one tile in Treemap.
Now I have a clickable Card look-alike, which can interact with other visuals.
Hope this helps someone out there!