Forum Discussion
Matrix background color help
Is it possible to provide different background color for each month in a matrix.
Please help .
Hi Anonymous ,
You can create a measure for conditional formatting:
Colour = SWITCH(MONTH(MAX(Dim_Date[Date])), 1, "red",2, "blue",3,"green","yellow")If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
2 Replies
- amitchandak
Super User
Anonymous , You can create a color measure and use that in conditional formatting using field value option
example
Colour =
SWITCH(TRUE(),
max('Table'[Month Year]) = "Jan-2020", "red",
Max('Table'[Month Year]) < "Feb-2020", "orange",
//keep on adding
"green")or
Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))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 - v-deddai1-msft
Community Support
Hi Anonymous ,
You can create a measure for conditional formatting:
Colour = SWITCH(MONTH(MAX(Dim_Date[Date])), 1, "red",2, "blue",3,"green","yellow")If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai