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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.