Forum Discussion
Power BI : Matrix Conditional Formatting for each column
- 5 years ago
Hi, Anonymous
The key is not in a certain column, each value in the matrix is originally related to the row and column, as long as the logic is correct. You can try to create a measure, then use it in conditional formatting.
Like this:
Measure = VAR a = SUMX ( FILTER ( ALL ( 'Table' ), [account] = SELECTEDVALUE ( 'Table'[account] ) && [month] = SELECTEDVALUE ( 'Table'[month] ) ), [cost] ) RETURN IF ( a < 1000, "Red" )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , Are you column(pivot) ?
You can create a measure like these and use in conditional formatting with "Field Value" option
if(Max(Table[Col]) = "XYZ" , "red", "blue")
or more like example
Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values