In this blog, we will take you through the Power BI Card Visual and a workaround to present a card with conditional formatting. To know more about what is Power BI please check Power BI Blog. The conditional formatting, we do will not be on the Card Visual, but the output will certainly look like Card, which is a requirement in some cases. Many Power BI users have used Card Visual to represent some value on the Power BI Reports separately or above any other visual, but sometimes clients ask which is deemed difficult to achieve, but not impossible. So, let’s dive into the practical to know more about it.
Before, we proceed with a small introduction to the Power BI Card Visual. Big Number Tile or Power BI Card Visual is used to represent a single important number or value which is an aggregated value or value generated from a measure.
The above picture shows a card having an Overall Avg value. So, this is how we can use Cards to show some important values in our reports. If we want to do some conditional formatting on a Power BI Card Visual, it is impossible to do so as there is no such option.
Now, we will show you some examples through which we can make a look-alike of a Power BI Card Visual having the functionality of conditional formatting using a Power BI Table Visual:
We have sample data that has scores weekly-wise, but we need to have data Monthly Wise, so we added a Month Column and a Month Num Column (For Sorting). Now, we have a visual which looks something like this which has a card showing the Overall Avg Score of ABC Month Wise.
What if we would like to have a Card like visual showing the difference between the current month and overall score like the one shown below?
So, let’s get started. First, we will create the two measures one for the Overall Avg and the other one Overall Avg Difference. Select the Power BI Table Visual and add the measures created.
Then, we will switch to the formatting tab and change the background color.
Again, in the formatting tab, we will select the Field Formatting section and change the Background and Font color and also enable Apply to header option as shown in the pic below.
Rename the Overall Avg Difference measure with a dot (.) and then go to the field formatting tab again for the Overall Avg Difference column which is renamed to a Dot(.). Change the background color and enable the Apply to header option as well. Now our visual will look like this.
Click on the arrow on the column Dot(.) for conditional formatting and select the options Font Color.
In the Font Color page, select Format by as Rules, add two rules as shown below, and select colors for them.
Then select Icons under Conditional Formatting:
On the Icons page, create two rules as mentioned below and click Ok.
Under the Formatting Tab, Grid selection, change the outline color to the Background color and your visual will look like this. Now we can change the size of the font and place it above our line visual.
So, after changing the font size and placing the Power BI Table Visual over Power BI Line Visual, the visual will look something like this and will give you a feel of Power BI Card Visual with Conditional Formatting.
I hope you like this blog which will give you a workaround for how we can make a Power BI Card Visual with Conditional Formatting look alike using a Power BI Table Visual.