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

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

Reply
Aysh_2104
Helper II
Helper II

Conditional formatting to reflect only in one measure inside switch

i have a table with different measure using a switch formula. I need to show the conditional formatting only for one measure under the switch. when i say conditional its a color coding based on the number. Is there any option to create conditional formatting for measure under switch measure

 

Example :-

SlicerSelection = VAR Selection = SELECTEDVALUE ( 'Selection Table'[Selection] ) RETURN SWITCH ( TRUE (), Selection = "Domestic", [Domestic], Selection = "International", [International], CALCULATE ( SUM ( 'financials'[Profit] ) ) )


under this measure i want to only color code the financial profit based on number like -0, red between 0-5 yellow above 5 green. Please suggest

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

Hi, @Aysh_2104 

You can add a measure like:

 

Color = SWITCH(TRUE(),[SlicerSelection]<=0,"red",[SlicerSelection]>0&&[SlicerSelection]<=5,"yellow",[SlicerSelection]>5,"green")

 

Then apply it to conditional formatting of  field background color:

veasonfmsft_0-1664792023448.png

Reltead tutorial:

Apply conditional formatting in tables and matrixes 

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Aysh_2104 

You can add a measure like:

 

Color = SWITCH(TRUE(),[SlicerSelection]<=0,"red",[SlicerSelection]>0&&[SlicerSelection]<=5,"yellow",[SlicerSelection]>5,"green")

 

Then apply it to conditional formatting of  field background color:

veasonfmsft_0-1664792023448.png

Reltead tutorial:

Apply conditional formatting in tables and matrixes 

 

Best Regards,
Community Support Team _ Eason

Greg_Deckler
Community Champion
Community Champion

@Aysh_2104 Have a look at this:

Min/Max Color Formatter - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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