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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.