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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I would like to set up conditional formatting on my matrix so that a yellow, red, or green icon shows up in the cell depending on whether the user has completed it or not. If the user has completd it, a date will display (would like a green icon to show up next to the date). If the user has not completed it, the cell will either have "not assigned," "in progress," "or registered" in it (would like a yellow or red icon here). The issue is that the default options for conditional formatting only allow me to input percentage, and there are no percentages in my data, just a date or "in progress," "registered," etc. I cannot find an option to change this so that I can input text for conditional formatting. A screenshots is below:
Solved! Go to Solution.
Hi, @ld17
You can try to use this dax code:
Measure 2 = var _flag= MAX('Table'[Column1])
return
SWITCH( TRUE() ,
_flag="deleted" , 1,
_flag="in progress" , 2,
_flag="registered",3,
IFERROR(DATEVALUE(_flag),-1)<>-1,4
)
The configuration need to add '4':
The result is as follows:
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks so much for the solution. This works well. One question: if a completed training displays as a date rather than the text "completed," what value should I be putting below?
Hi, @ld17
You can try to use this dax code:
Measure 2 = var _flag= MAX('Table'[Column1])
return
SWITCH( TRUE() ,
_flag="deleted" , 1,
_flag="in progress" , 2,
_flag="registered",3,
IFERROR(DATEVALUE(_flag),-1)<>-1,4
)
The configuration need to add '4':
The result is as follows:
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
This works perfect. Thanks so much!
Hi , @ld17
According to your description, you want to add a conditional formatting icons for a text .
Here are the steps you can refer to :
[1] First method , we can add a measure to just return the image, like this:
Measure = var _flag= MAX('Table'[Column1])
return
SWITCH( _flag ,
"deleted" , "🔴",
"in progress" , "🟢",
"registered","🟡")
Then we just need to put the measure on the visual and we can meet your need:
[2]Second , we can also add a measure as the judgement to the "conditional formatting icons".
Measure 2 = var _flag= MAX('Table'[Column1])
return
SWITCH( _flag ,
"deleted" , 1,
"in progress" , 2,
"registered",3)
Then we configure the "conditional formatting icons":
We can also meet your need , the result is as follows:
[3]The third method can add some custom icon in power bi , if you need , you can refer to :
Include Custom Icons in Your Tables - Microsoft Power BI Community
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
86 | |
43 | |
40 | |
35 |