Skip to main content

Power BI

New

Conditional formatting to set background color to the column values in Matrix visual.

Vote (12) Share
Vamshi Krishna's profile image

Vamshi Krishna on 14 Nov 2018 04:00:04

Conditional formatting to set background color to the column values in Matrix visual.

Comments (2)
Vamshi Krishna's profile image Profile Picture

2dc7495a 306d-4e94-9c48-d6e6da71bfc0 on 06 Jul 2020 00:09:39

RE: Conditional formatting to set background color to the column values in Matrix visual.

Trying to change background color for work hours based on CategoryDesc field. This DAX formula is not working. I have tried Color Scale, Rules and Field Values nothing is working. This should not be this difficult to change.

Color = IF('dim ProjectCategory'[CategoryDesc]="Holiday", "1", IF('dim ProjectCategory'[CategoryDesc]="Vacation","2", IF('dim ProjectCategory'[CategoryDesc]="Labor - Salary","3",IF('dim ProjectCategory'[CategoryDesc]="Labor - Hourly", "4",IF('dim ProjectCategory'[CategoryDesc]= "Labor - Daily","5","")))))


Name ProjectCategoryGroup Category CategoryDesc WorkHours
Jane Doe LABOR HOLIDAY-L Holiday 8
Jane Doe LABOR HOLIDAY-L Holiday 8
Jane Doe LABOR HOLIDAY-L Holiday 24
Jane Doe LABOR LABOR-DLY Labor - Daily 11
Jane Doe LABOR LABOR-DLY Labor - Daily 12
Jane Doe LABOR LABOR-HRLY Labor - Hourly 160
JDoe LABOR LABOR-SAL Labor - Salary 16

Jane Doe LABOR VACATION Vacation 16

Vamshi Krishna's profile image Profile Picture

a3309361 99be-ea11-a812-000d3a8ddfb2 on 05 Jul 2020 23:56:28

RE: Conditional formatting to set background color to the column values in Matrix visual.

It would be nice in situations where you have banded rows but need to use conditional formatting to set the font color equal to the background color if a certain value shows up.