Using text measures in multi-row cards in Power BI

A not-so-well-known feature of the multi-row card visual in Power BI is that it can have its own title, called Card Title, in addition to the title any visual can have. In the image above, the Card Title is blue, and it is formatted separately from the visual title. It only works if you use one measure that returns text, and all other visuals are not text. In this blog post, I’m sharing a technique to display text as values in a multi-row card and still have the special Card Title.

The problem

Let’s say you create a multi-row card with Card Title and two numeric measures. The measures are as follows:

Title = "This is a multi-row card title"

Some Number = 1

Another number = 2

The result is going to be similar to the following:

Now let’s say you want to add a text measure to the visual:

Some text (wrong) = "a"

As soon as you drop the measure in the field well, your visual will look as follows:

The problem is that to use the Card Title, you must have exactly one measure that returns text, and in this case we have two, so Power BI can’t tell which one is Card Title.

The solution

To use a text measure as a value in a multi-row card, we can tamper with data types a bit. What looks like text but is not text? The Variant data type.

You can’t set the type of a measure to Variant yourself, but you can write DAX that instructs Power BI that a measure can potentially return different data types. We can write a measure as follows:

Some text = IF(TRUE, "a", 1)

This measure will never return 1, but this does not stop Power BI from setting its type to Variant behind the scenes. Now that it’s not text, we can have the Card Title:

Thanks to Reid Havens for inspiring me to write this blog post 😊

  • eromrab

    I want the opposite… ish. I want 1 text field in my multi-row card but I don’t want it to automatically become the title… any way to stop that? Other than adding another text field? I created a column where all the values and the title are Unicode character 200B (a 0 width space) and it seems to work, except it messes up formatting because there is an empty column in the cards… they really need a way to disable this automatic title making…

    • You can employ exactly the same technique as I described, and the measure won’t become a title because its data type will be Variant 🙂 I’ve just tested it, and it works.

      • eromrab

        Yeah, my issue is I’m not using measures, but columns and you can’t setup variant columns…

  • nadarcas

    Just what i was looking for and worked exactly as expected… thank you!