Forum Discussion
Matrix conditional formatting (with Icons)
Hi all,
I conditional formatted my matrix such that the text color changes if it is above/below the overall average value. However, instead of different text color, I would like to show green and red circle icons next to the value instead. Could you advice on how I can change my measure below to achieve this? Thank you.
Current view:
Desired view:
Current measure:
- Anonymous5 years ago
I figured out that it can be done by simply using "CircleHigh" instead of "green" in the above formula. Then apply conditional formatting using "Icons" instead of "Font color"
It then looks like this:
4 Replies
- Pragati11Super User
Hi Anonymous ,
Check the following blog on how you can achieve icon formatting in Powerr BI: (scroll to the bottom)
Also if you want it in matric visual then check the following thread:
https://community.powerbi.com/t5/Desktop/Matrix-conditional-formatting-Icon/td-p/1526319
Thanks,
Pragati
- selimovdMost Valuable Professional
Hey Anonymous ,
I think the easiest way is with icons.
Check the following article, they describe exactly what you want:
Adding icons into the table and matrix visuals (wiseowl.co.uk)
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - AnonymousNot applicable
Thanks both.
It seems like the suggestions provided so far require adding an icon by adding another field/measure. Is there a way to just alter the existing measure so that the icon appears next to my measure and in the same column?ColorFormat =var Freq_Overall = DIVIDE(CALCULATE(COUNTROWS(Sheet1),ALL(Sheet1[Clinic])),CALCULATE(DISTINCTCOUNT(Sheet1[Day]),ALL(Sheet1[Type],Sheet1[Color],Sheet1[Clinic])),0)returnSWITCH(MAX(Sheet1[Type]),"Cat",IF(Sheet1[Freq per day]>Freq_Overall,"green",IF(Sheet1[Freq per day]=Freq_Overall,"black","red")),"Dog",IF(Sheet1[Freq per day]>Freq_Overall,"green",IF(Sheet1[Freq per day]=Freq_Overall,"black","red")))- AnonymousNot applicable
I figured out that it can be done by simply using "CircleHigh" instead of "green" in the above formula. Then apply conditional formatting using "Icons" instead of "Font color"
It then looks like this: