Power BI: How to Apply Conditional Formatting to a Card


Often you may want to apply conditional formatting to a card in Power BI so that the font color on the card changes based on the value displayed.

Fortunately this is easy to do by using the Conditional Formatting feature within the Callout value dropdown menu of the card.

The following example shows how to use this feature in practice.

Example: Apply Conditional Formatting to Card in Power BI

Suppose we have the following dashboard in Power BI that includes a matrix that summarizes the total points scored by basketball players on various teams along with a card that shows the sum of points scored:

Suppose that we would like to apply conditional formatting to the card so that the font color is displayed as blue if the sum of the points is greater than or equal to 100 or red if the sum of points is less than 100.

To do so, click the card to make it active. Then click the Format your visual tab under Visualizations, then click the dropdown arrow next to Callout value, then click the Conditional formatting (fx) icon under Color:

In the new window that appears, click the dropdown arrow under Format style and choose Rules.

Then create two rules that specify the font color to be red if the points value shown in the card is less than 100 or blue if the points value is greater than or equal to 100: 

Once you click OK, the conditional formatting will be applied to the card:

Now if you click on an individual team in the matrix, such as team B who has 92 points, the font color of the card will automatically change to red since it displays a value less than 100:

And if you click on another team, such as team A who has 123 points, then the font color of the card will change to blue since it displays a value greater than or equal to 100:

Note: In this example we only used two rules as conditional formatting but you can create as many rules as you’d like.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

Power BI: How to Apply Conditional Formatting to Text Column
Power BI: How to Apply Conditional Formatting to Bar Chart
Power BI: How to Write a Case Statement

Leave a Reply

Your email address will not be published. Required fields are marked *