Forum Discussion
Conditional formatting for multiple columns issue - Need Help
- 6 years ago
Anonymous , In a matrix you should be able to define a rule for all the columns.
You can create a color measure and use that with "Field" Option
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" )Color Field - Color Measure - Conditional formatting
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
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692 - 6 years ago
Hi Anonymous ,
Create a measure like this, choose Field value in the conditonal format page, apply it on the background of the previous measure:
color = SWITCH( TRUE(), SELECTEDVALUE('Table'[Group]) = "A" && 'Table'[test] >=1 && 'Table'[test] <=15, "#1E90FF", SELECTEDVALUE('Table'[Group]) = "B" && 'Table'[test] >=1 && 'Table'[test] <=30, "#00FA9A", SELECTEDVALUE('Table'[Group]) = "C" && 'Table'[test] >=1 && 'Table'[test] <=45, "#8A2BE2", "#FF0000" )Attached a sample file that hopes to help you: conditional format.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , In a matrix you should be able to define a rule for all the columns.
You can create a color measure and use that with "Field" Option
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"
)
Color Field - Color Measure - Conditional formatting
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
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692