Forum Discussion
Conditional Formatting on Matrix with % of Column Total
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
1 Reply
- lbendlin
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-Forum/ba-p/963216
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/1447523