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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
LABrowne
Helper II
Helper II

DAX: Background colours for whole row

Hello there,

 

I am working on creating a table of sales orders. Sometimes we have orders that have later been cancelled but show up on the orders table. Usually someone will log this info with the order name and at the end put "- Cancelled" e.g. Sarah Jane - Cancelled. This is so we can see which orders have been cancelled. If an order has Cancelled at the end of it I want the whole row's background color to be Red. This what I have so far:

 

Background Cancellation Colours =
IF MAX (Orders[OrderName]) = "Cancelled" , "Red", BLANK())
 
I believe I am going wrong because no order name is just "Cancelled" it's just apart of it if there is a contains formula it might work.
 
Any help would be great!
 
Kind regards,
Luke
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @LABrowne ,

 

try like:

Background Cancellation Colours =
IF ( CONTAINSSTRING(MAX (Orders[OrderName]), "Cancelled") , "Red", BLANK())

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @LABrowne ,

 

try like:

Background Cancellation Colours =
IF ( CONTAINSSTRING(MAX (Orders[OrderName]), "Cancelled") , "Red", BLANK())

Thank you very much!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.