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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
cbolling
Helper I
Helper I

Conditional Formatting Matrix Values based on the column subtotals

Hi All,

 

I have a client that wants to shade the values in the matrix red if that value is less than the subtotal in that column, and shade it green if the value is more than the subtotal in that column. So I need to create a measure that will allow me to use the conditional formatting function. 

 

I have a matrix that has customers as the rows, products as the solumns, and average sale price as the values. The column subtotals are the average sale price for the whole column (product). So if a customer has an average sales price for product X that is less than the overall average sale price of product X, that value should be shaded red. If a customer has an average sales price for product X that is higher than the overall average sales price of product X, that value should be shaded green.

 

 

I appreciate your help!

2 REPLIES 2
Anonymous
Not applicable

This option is already available in power bi. Please refer to the below article. 

 

https://www.mssqltips.com/sqlservertip/6265/power-bi-conditional-formatting-for-matrix-and-table-vis...

 

Hi,

 

I already know how to conditional format. But I need help to base it off of the subtotals in the matrix. I either need a measure that is a 1 if selected value is higher than the subtotal for all, or a 0 if the selected value is lower than the subtotal for all. Then, use the value of this measure to create the conditional formatting. I am not sure how to make this measure though.

 

Thanks

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.