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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
cmilligan262
Helper II
Helper II

PowerBI forcing Value Conditional Formatting

I'm trying to add conditional formatting to my totals in PBI. I'm having an issue where it is forcing me to designate values to apply the conditional formatting rather than basing it on lowest, middle, and highest value.

 

This is inside of a matrix and based on a measure. I've been able to use lowest middle and highest in other visuals in the reports, so I'm not sure why it's forcing it in this situation. 

 

Also is there a way to only apply values to column total, rather than both column and row totals?

 

cmilligan262_0-1643218077312.png

 

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @cmilligan262 ;

If your visual object is a matrix and does column totals, you need to create a measure using the ISINSCOPE() function;

Then you can choose the appropriate method from Color based on a calculation, Color by Color values, Color by Rules, Color by Color scale.

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting


If that still doesn't work, can you share more about the table structure and the result presentation you want to output?

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

cmilligan262
Helper II
Helper II

So I found a workaround. By taking one of my other visuals where this field is conditionally formatted as desired as a template. I pasted that visual in the page I'm editing and changed the visual to match without changing the conditional formatting. This seems to work but BI doesn't like it as it just seems to be accepting it but I can't select it to be that way in the conditional formatting screen.

 

@amitchandak thank you for your response. As far as conditional formatting goes is there a way to get it to apply to the column subtotal but not the row subtotal? 

amitchandak
Super User
Super User

@cmilligan262 , I doubt there is the way. But you can create a color measure, there you can use isinscope or isfiltered and control it. But the measure is not good for gradient .

 

examples

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

 

Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

 

 

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

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

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.