Forum Discussion
Anonymous
6 years agoNot applicable
Matrix conditional format Background color each cell
Hi All,
I am currently looking to conditional format background color of each cell depending on column category & row value using conditions. Is there a way to do it? Please let me know.
Thanks
Susheel
- Anonymous6 years agoHi Susheel,According to your description, it seems that you want to custom cell background color based on some rules, right?
You could try to follow the steps:
1. Create a new measure.
2. Click the visualization ,then go to Fields in Visualizations pane.
3. Right-click or select the down-arrow next to the field in the Values.
4. Select Conditional formatting ,then Background color.
5. In the pop-up window, Select Field value in Format by field and select the created measure in step1 for Based on field.For example, the following formula applies different color values to Units Sold column, based on the value of Discount Band and Units Sold columns.Discount Band color = SWITCH ( TRUE (), SUM ( financials[Units Sold] ) < 50000 && SELECTEDVALUE ( financials[Discount Band] ) = "High", "Yellow", SUM ( financials[Units Sold] ) > 50000 && SELECTEDVALUE ( financials[Discount Band] ) = "Low", "Red" )My example table with Units Sold background color based on calculated looks like this:Is this result what you want? If you have any questions, please upload some data samples and expected output.
Please do mask sensitive data before uploading.Best Regards,
Eyelyn Qin
2 Replies
- AnonymousNot applicableHi Susheel,According to your description, it seems that you want to custom cell background color based on some rules, right?
You could try to follow the steps:
1. Create a new measure.
2. Click the visualization ,then go to Fields in Visualizations pane.
3. Right-click or select the down-arrow next to the field in the Values.
4. Select Conditional formatting ,then Background color.
5. In the pop-up window, Select Field value in Format by field and select the created measure in step1 for Based on field.For example, the following formula applies different color values to Units Sold column, based on the value of Discount Band and Units Sold columns.Discount Band color = SWITCH ( TRUE (), SUM ( financials[Units Sold] ) < 50000 && SELECTEDVALUE ( financials[Discount Band] ) = "High", "Yellow", SUM ( financials[Units Sold] ) > 50000 && SELECTEDVALUE ( financials[Discount Band] ) = "Low", "Red" )My example table with Units Sold background color based on calculated looks like this:Is this result what you want? If you have any questions, please upload some data samples and expected output.
Please do mask sensitive data before uploading.Best Regards,
Eyelyn Qin - AnonymousNot applicable
Hi Anonymous ,
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting
https://radacad.com/show-me-the-biggest-number-conditional-formatting-in-power-bi
https://www.youtube.com/watch?v=BbuikATa3ow
https://www.youtube.com/watch?v=MAISRa88bl0
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)