Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
AMcMasterSage
New Member

Conditional formatting with text

Hi All,

I'm very new to using PowerBI so I may need a 'For Dummies' explanation here, but essentially what I'm trying to do is a traffic light status for the below pictured table;

AMcMasterSage_0-1633945058885.png

 

The idea is that the traffic light should be red if everything in the row (Save the year and month) reads 'Not Started', and should be green if everything in the row reads 'Approved by FD'. Anything else should show the light as yellow. I've had a go at trying to do this but I'm not really certain on how you would go about doing this. Any advice or steps is appreciated, thank you.

1 ACCEPTED SOLUTION
jaideepnema
Solution Sage
Solution Sage

Hi @AMcMasterSage ,

Create a calculated column like this:

Status = SWITCH(TRUE(),

Data[Canada]="Approved by FD" && Data[France]="Approved by FD" && Data[Germany]="Approved by FD" && Data[Portugal]="Approved by FD" &&Data[South Africa]="Approved by FD" && Data[Spain ]="Approved by FD" &&Data[USA]="Approved by FD" &&Data[UK]="Approved by FD",1,

Data[Canada]="Not Started" && Data[France]="Not Started" && Data[Germany]="Not Started" && Data[Portugal]="Not Started" &&Data[South Africa]="Not Started" && Data[Spain ]="Not Started" &&Data[USA]="Not Started" &&Data[UK]="Not Started",2,

3)
And apply conditional formatting on this column as shown below:
jaideepnema_0-1633947274106.png

 

This will give you the expected output:
jaideepnema_2-1633947303497.png

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

 

View solution in original post

3 REPLIES 3
jaideepnema
Solution Sage
Solution Sage

Hi @AMcMasterSage ,

Create a calculated column like this:

Status = SWITCH(TRUE(),

Data[Canada]="Approved by FD" && Data[France]="Approved by FD" && Data[Germany]="Approved by FD" && Data[Portugal]="Approved by FD" &&Data[South Africa]="Approved by FD" && Data[Spain ]="Approved by FD" &&Data[USA]="Approved by FD" &&Data[UK]="Approved by FD",1,

Data[Canada]="Not Started" && Data[France]="Not Started" && Data[Germany]="Not Started" && Data[Portugal]="Not Started" &&Data[South Africa]="Not Started" && Data[Spain ]="Not Started" &&Data[USA]="Not Started" &&Data[UK]="Not Started",2,

3)
And apply conditional formatting on this column as shown below:
jaideepnema_0-1633947274106.png

 

This will give you the expected output:
jaideepnema_2-1633947303497.png

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

 

@jaideepnema I am looking for a similar solution but I need it to be OR not AND. How would this be changed to use an OR statement? I modified the above for my columns but if the first cell is not Y or N then the conditional formatting doesn't apply to the whole row.

 

Jhadur_0-1717685482948.png

 



amitchandak
Super User
Super User

@AMcMasterSage , You should be able to create is using unichar and color measure

 

use unichar of circle (https://exceleratorbi.com.au/dax-unichar-function-power-bi/
)  as measure and in conditional formatting use a measure like one below in field value

/////Arrow
/////Arrow Color
Arrow color =
var _change =max(Status)
return
SWITCH (
TRUE(),
"Not Started "> 0, "green",
"Approved by FD" = 0, "Yellow",
 "red"
)

 

 

 

if you need arrow

 

Arrow =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)

 

 

refer

UNICHAR - Tool for Custom Icon Formatting: https://www.youtube.com/watch?v=veCtfP8IhbI&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=50

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors