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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AverageBiUser
Frequent Visitor

Conditional Formatting on Matrix with % of Column Total

AverageBiUser_0-1693493327611.png

Above is how i would like to format my matrix, with a gradient colour scheme. However, not matter how hard i try to refine the filters in a conditonal formatting measure, I cannot get the desired output.

 

Below is always the result i get which shows conditional formatting based on total value, rather than column value.

 

Notice how Row 1, Column 4 has a value of 1 (below) but a value of 100% (above) - I would like this to be the darkest colour possible on the gradient of colours.

 

The row & column fields that support the matrix are from the same table as the measure

 

AverageBiUser_2-1693493407487.png

 

1 REPLY 1
lbendlin
Super User
Super User

Create a measure for the gradient color, use REMOVEFILTERS(), ALLEXCEPT() or ALLSELECTED() to get the range for your specific column, then compute the percentage of the current value versus the range and then return the desired gradient.

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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