Forum Discussion
Conditional Formatting Matrix Columns
- Anonymous9 years ago
Conditional formatting applies to a range of values in a single column of your original table, when you create a Matrix visual using fields of the original table, all values come from this single column, thus conditional formatting goes on the entirety of the Matrix.
The feature you describe can’t be achievable in Power BI Desktop, you can submit a feature request in the Power BI ideas forum: https://ideas.powerbi.com/forums/265200 .Thanks,
Lydia Zhang
I found this thread looking for the same conditional formatting color scale "per column".
I thought I was close using RankX to get the format key below, but that still didn't work.
I think that I've found an answer in this youtube video.. https://www.youtube.com/watch?v=wTRrskQzAHk
He brings it together at the end, and it looks to work in my scenario.
__PerMonthColorScale =
VAR SummaryTable =
CALCULATETABLE(
ADDCOLUMNS(
SUMMARIZE(
Forecasts,
Projection_Master[JOBNUMBER_I],
Forecasts[TargetMonth]
),
"CurrentProjection", [Current Projection]
),
ALLSELECTED('Job Summary')
)
VAR MaxValue =
MAXX(
SummaryTable,
[CurrentProjection]
)
VAR MinValue =
MINX(
SummaryTable,
[CurrentProjection]
)
VAR Range = MaxValue - MinValue
VAR Hue =
Round(
DIVIDE(
[Current Projection] - MinValue,
Range
) * 120,0)
VAR Color = "hsla(" & Hue & ", 100%, 50%, 1)"
RETURN
if (ISBLANK([Current Projection]),
BLANK(),
color
)