Forum Discussion
Conditional formating in Power BI Matrix similar like excel ?
Hi,
Can I do conditional formatting in Power BI Matrix similar to Excel?
Risk Level Colour =
SWITCH (
SELECTEDVALUE ( 'DimRisk'[Risk Level] ),
"1 - Critical", "#C00000", -- Red
"2 - High", "#ED7D31", -- Amber
"3 - Medium", "#FFD966", -- Yellow
"4 - Low", "#70AD47", -- Green
"5 - Entry", "#A5A5A5", -- Grey
"#FFFFFF"
)
My PBI Matrix looks like below
And I have Risk level as Rows
Instead of Matrix visual, if you use Table visual then you can format rows easily. Go to cell elements and then select column one by one and apply the background color.
9 Replies
- cengizhanarslan
Super User
-
Go to Conditional formatting → Background color
-
Choose Format by: Field value
-
Select Risk Level Colour
-
- danextian
Super User
Hi ashmitp869
It appears that you're trying to apply formatting to the row headers. Conditional formatting for matrix row and column headers is currently not supported. Your measure can be used as a field value for conditional formatting on the values section only.
- ashmitp869
Responsive Resident
Yes you are correct.
I understand the conditional formatting works only on measures
Is there any way to do the conditional formatting in rows?
like below- diksshaRegular Visitor
Instead of Matrix visual, if you use Table visual then you can format rows easily. Go to cell elements and then select column one by one and apply the background color.
- krishnakanth240
Super User
Hi ashmitp869
Can you share sample data of tables in text format used in Matrix visual. Also, share the expected output/view you are looking for.
- diksshaRegular Visitor
Yes, Power BI allows conditional formatting. In the format pane go to 'Cell elements' and in that select the value column which you would like to format. Switch on the 'Background color' option. In the format style you can either use 'Rules' or 'Field value'.
In 'Rules', select the column based on which you would like to create the conditions and then you can type it. For 'Field value', you just need to select the measure where you have written rules for conditional formatting. - diksshaRegular Visitor
Yes, Power BI allows conditional formatting. In the format pane go to 'Cell elements' and in that select the value column which you would like to format. Switch on the 'Background color' option. In the format style you can either use 'Rules' or 'Field value'.
In 'Rules', select the column based on which you would like to create the conditions and then you can type it. For 'Field value', you just need to select the measure where you have written rules for conditional formatting. - v-karpurapud
Community Support
Hi ashmitp869
Thank you for submitting your question to the Microsoft Fabric Community Forum, and thanks to cengizhanarslan , danextian and dikssha for offering helpful suggestions.
Could you let us know if the suggested solution resolved your issue? If it's still pending, please let us know any further details so we can help.
Best regards,
Community Support Team. - v-karpurapud
Community Support
Hi ashmitp869
We have not received a response from you regarding the query and were following up to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank You.