Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello Everyone,
I have a data set showing in a matrix. The rows indicate the KRI and then I have the Quarters as columns.
I would like to do conditional formating on the visualization that can be different for each row. I could only manage to have the conditional formating be based on a specific value.
To better understand the data, I have a column for Key Risk Indicators and another column for its value. The values are entered manually each month by the user after selecting the right date.
Thank You
Solved! Go to Solution.
Hi @Anonymous ,
Agree with @VijayP that you need to create a measure for multiple conditions.
Below is my example:
Conditional Formatting =
SWITCH(TRUE(),
CONTAINSSTRING(MAX('Table'[KRI]),"Budgeted Gross Margin"), IF(SUM('Table'[Value])>12,"Light Green","Red"),
CONTAINSSTRING(MAX('Table'[KRI]),"Days Inventory"), IF(SUM('Table'[Value])<=35,"Red", IF(SUM('Table'[Value])<=45,"Yellow","Green")),
"Light Blue")
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Agree with @VijayP that you need to create a measure for multiple conditions.
Below is my example:
Conditional Formatting =
SWITCH(TRUE(),
CONTAINSSTRING(MAX('Table'[KRI]),"Budgeted Gross Margin"), IF(SUM('Table'[Value])>12,"Light Green","Red"),
CONTAINSSTRING(MAX('Table'[KRI]),"Days Inventory"), IF(SUM('Table'[Value])<=35,"Red", IF(SUM('Table'[Value])<=45,"Yellow","Green")),
"Light Blue")
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous
Thank you for the reply it helped a lot.
However, When I tried to do the conditional formating I ran into the following issue.
In the measure for Budgeted Gross Margin - Packaging i have set the rule for if the value is less than 5 then it should be red. but it is still showing as yellow in the Visualization.
Thank You
So I fixed this.
All I had to do was replace sum with averge, since in my case I am taking the average of all the values for each quarter.
@Anonymous
Create a measure for conditional formatting and use the field value option to create conditional formatting
I think you are currently using the UI conditional formatting which is not dynamic
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
66 | |
65 | |
57 | |
39 | |
28 |
User | Count |
---|---|
84 | |
60 | |
45 | |
41 | |
39 |