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
Anonymous
Not applicable

Conditional Formatting based on Total

Hi,

 

I'm trying to add conditional formatting to values in a column based on the difference between that value and the total of the column.  So if the value in the column is 5% lower or higher than the column total, I'd like to apply conditional formatting to that value.  Is this possible in PBI?

 

Thanks,

Gary

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 If your datasource contains some specific data structure, can you please share a pbix file with some dummy data for test?

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

CoreyP
Solution Sage
Solution Sage

What you can do is create another column that does your row by row calculation, and then use that field for your conditional formatting rules. 

 

For example, I created a measure for column total:

Col Total = CALCULATE( SUM( TEST[TEST] ) , ALL( TEST ) )
 
Then created a new column:
% of Tot = TEST[TEST] / [Col Total]
 
Then when you go to set up your conditional formatting, change the "Based on Field"TEST.PNGTEST2.PNG
Anonymous
Not applicable

Hi, @CoreyP , thank you for your answer, but I probably should've been a bit more specific.  

 

I have this field, which is currently called 'L12 Customer Line Item Mkt Share %.'  

 

Capture.JPG

You'll see on the first row a % of 21.7%, and a total for the column of 15.3%.  In this instance, I want to be able to conditionally format the 21.7% because it's >5 points above the total for the columns (15.3%).  Any ideas on how to do this?

Is this field data pulled from a source, or is that a DAX calculation of some kind?

Anonymous
Not applicable

@CoreyP it is a DAX measure, dividing two fields: Customer - L12  Sales $ by Total Market - L12 Sales $.

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.