I am fairly new to Power BI / DAX and trying to write an expression that will change the colour of the variables '_variance' and '_variance_year' in a Power BI card. The measure that I have created for the text in the Card Callout value is:

I am fairly new to Power BI / DAX and trying to write an expression that will change the colour of the variables '_variance' and '_variance_year' in a Power BI card. The measure that I have created for the text in the Card Callout value is:
To achieve different colors for the _variance and _variance_year values in a Power BI card, you will need to use two separate measures for coloring each part.
1 - Create Measures for Formatted Text:
Formatted Variance Text =
VAR _variance = DIVIDE([ReleasedOnTime], [Previous Term]) - 1
VAR _variance_year = DIVIDE([ReleasedOnTime], [PreviousYear]) - 1
RETURN
FORMAT(_variance, "0.0%") & " " & IF(_variance >= 0, "▲", "▼") & " | " &
FORMAT(_variance_year, "0.0%") & " " & IF(_variance_year >= 0, "▲", "▼")
2 - Create separate measures to determine the color for each value:
Variance Color =
VAR _variance = DIVIDE([ReleasedOnTime], [Previous Term]) - 1
RETURN
IF(_variance >= 0, "Green", "Red")
Variance Year Color =
VAR _variance_year = DIVIDE([ReleasedOnTime], [PreviousYear]) - 1
RETURN
IF(_variance_year >= 0, "Green", "Red")
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.