Serdia
Serdia

Reputation: 4428

Is it possible to change font color for only a part of the string in card power bi?

I have a dax expression where I am concatenating strings with other dax measures

Net WP = 
    "Net Written Premium " 
    & FORMAT([CY YTD],"$#,##,,.0M") 
    & " vs. " & FORMAT([PY YTD],"$#,##,,.0M") 
    & " " & MAX(dim_Date[Year]) -1 
    & " "& [Net Wr Premium YOY Title]

Result look like this:

enter image description here

Is any way I can change the font color for only the last part of the string? ([Net Wr Premium YOY Title])

so it should look like this:

![enter image description here

Maybe there are special visuals for that that I am not aware of?

Thank you

Upvotes: 3

Views: 9092

Answers (2)

Ryan B.
Ryan B.

Reputation: 3665

You can cheat your way around this by using two cards Put the conditional formatting on one card, turn off all the borders and labels, and set it to just the measure. Then put it right on top of the other card that has your desired text. 1 2 3

Upvotes: 1

Giovanni Luisotto
Giovanni Luisotto

Reputation: 1400

You can apply conditional formatting to almost any visual now, you can find it in a "hidded" menu, but what you ask is not possible, the whole string will be colored. Have a look at the custom visuals in the marketplace, maybe you will find something that helps you.

For the conditional formatting of the card visual: Formatting -> Data label -> Color (hover it, and 3 dots will appear on the right, there you will find the conditional formatting)

enter image description here

Upvotes: 1

Related Questions