Hello to all, One question I see currently showing up on the forum is to have different header colours, but most of the times since the conditional formatting is only applied to values people tend...
That formatting is not possible has we are doing it with the header of the columns since it's a functionality of the system.
A workaround can be the following:
Create a measure for calculating the SUB
Sub_Category_Measure = SELECTEDVALUE(Table1[Sub])
Add this measure before the the other 3 measures
This will give you a column on your matrix with the same values as the rows headers
Decrease the size of the column Sub Category
Create a measure for the condittional formatting
Background = SWITCH([Sub_Category_Measure]; "aa";"#5DFF0E";"bb";"#E4FF09";"cc";"#FF6E00")
Font text = SWITCH([Sub_Category_Measure] ; "DifferentTextFromSUB";"#000000";"#FFFFFF")
I'm assuming that you also wnat to change the font colour to other one, writing a code that is different from any value in the sub will give the possibility to have 2 colours if you want one per category adjust the one for background with other colors.
Apply the condittional formatting to the Sub_Category_Measure
On the image above I didn't hide the column for you to visualize the final result of the measure created vs the row headers.
Check PBIX file attach on a wetransfer link (will be deleted after 7 days).
As refered this is a workaround and may need adjustments if you have parent and child category.