Conditional Formatting for String Value

I have PowerBI report that I would like to do some conditional formatting on the “ShipVia” column highlighted. I would like the background or text of the ShipVia field to change colors based on the below logic

Dayton = Yellow
Fedex = Green - Anything that has Fedex in the description actually.
Pickup = Red

***I do have conditional formatting on the ShipVia total records already to not display the header text which I need to have still. Basically I just have the font set as black which is the same as the background.

Let me know if you have any questions, thanks!!!

WarehouseAvailabletoShip.pbix (792.9 KB)

@Preston ,

Try this - Use whatever conditional formating rules on font you are using to blackout the total. Then conditionally format the background using this measure and the Field Value conditional formatting option.

CF Shipvia = 
SWITCH( TRUE(),
    CONTAINSSTRING( SELECTEDVALUE( SO_SalesOrderDetail[ShipVia] ), "PICKUP" ), "Red",
    CONTAINSSTRING( SELECTEDVALUE( SO_SalesOrderDetail[ShipVia] ), "DAYTON" ), "Yellow",
    CONTAINSSTRING( SELECTEDVALUE( SO_SalesOrderDetail[ShipVia] ), "FEDEX" ), "Lime Green",
   BLANK()
   
   )

  • Brian
1 Like

thanks so much! This worked perfect!!

1 Like