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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Unrelated Criteria for Conditional Formatting?

Hi

I have a matrix with employee names on the row pill and 3 measures on the columns (i.e., sum of hours worked, etc). I have conditional highlighting on the column for sum of hours worked but I also need to exclude the highlighting for certain employees (for example -those employees whose name starts with an 'E').

 

How can this be achieved?

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could show your expected result here. 

If you want to format employees whose name starts with an 'E', you could refer to the following measure.

Measure =
IF ( LEFT ( SELECTEDVALUE ( 'Table'[Name] ), 1 ) = "E", "green" )

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could show your expected result here. 

If you want to format employees whose name starts with an 'E', you could refer to the following measure.

Measure =
IF ( LEFT ( SELECTEDVALUE ( 'Table'[Name] ), 1 ) = "E", "green" )

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

@Anonymous , Create a color measure and use that in conditional formatting after using "Field" option

 

Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))

Color  = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170 
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column

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

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors