Forum Discussion
Background color Set
hi team
How to set backgrount color for a.Revanue,Total A.Revennue ,B.Expense,Total B.Expense
Hi rajasekar_o ,
You can achieve different background colors for specific rows in a Matrix by using a measure and applying it through conditional formatting.
Create a background color measure -
Row Background Color =
SWITCH (
SELECTEDVALUE ( Financials[Description] ),
"A.Revenue", "#E3F2FD",
"Total A.Revenue", "#90CAF9",
"B.Expense", "#FCE4EC",
"Total B.Expense", "#F48FB1",
"#FFFFFF"
)Please find the below attached .pbix file for your reference.
5 Replies
- IrwanSuper User
hello rajasekar_o
please check if this accomodate your need.
1. create a new measure with following DAX.
Color Palette =
IF(
SELECTEDVALUE('Table'[Description])="A",
"Red",
IF(
SELECTEDVALUE('Table'[Description])="C",
"Blue"
))2. select your table visual, then go to Cell Element then which conditional color you want, then go to Format Style, then pick the measure that has been created.Hope this will help.
Thank you.
- cengizhanarslanSuper User
1) Create a color measure
Example: highlight section headers and totals.
Row Background Color = VAR Desc = SELECTEDVALUE ( 'Table'[Description] ) RETURN SWITCH ( TRUE(), Desc = "A.REVENUE", "#E3F2FD", -- light blue Desc = "Total A.REVENUE", "#BBDEFB", -- darker blue Desc = "B.EXPENSE", "#FCE4EC", -- light pink Desc = "Total B.EXPENSE", "#F8BBD0", -- darker pink BLANK() )2) Apply it to the visual
Select your Table / Matrix
Go to Format pane
Values → Conditional formatting → Background color
Click fx
Set:
Format by: Field value
Based on field: Row Background Color
Summarization: First
- v-sshirivoluCommunity Support
Hi rajasekar_o ,
You can achieve different background colors for specific rows in a Matrix by using a measure and applying it through conditional formatting.
Create a background color measure -
Row Background Color =
SWITCH (
SELECTEDVALUE ( Financials[Description] ),
"A.Revenue", "#E3F2FD",
"Total A.Revenue", "#90CAF9",
"B.Expense", "#FCE4EC",
"Total B.Expense", "#F48FB1",
"#FFFFFF"
)Please find the below attached .pbix file for your reference.
- v-sshirivoluCommunity Support
Hi rajasekar_o ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
- v-sshirivoluCommunity Support
Hi rajasekar_o ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you