Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Individual background color for each column in a matrix

Hi Experts

 

I have created a matrix in Power BI. In columns I have used sub category. Now I have a requirement to display each column with different colors irrespecive of the values in it.

 

ie : Appliances column should show light green color vertically from its header to last value. Similarly another color for next column.

 

I  tried background colors and different scenario's. Nothing helped. Can anyone let me know if my requirement can be done in power BI?

 

upload.PNG

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Yes, usually you add calculated columns (sometimes also measures) to your data that contain the color code that corresponds to your condition (in the above case the product category column). Then you can apply conditional formatting "based on field value"

 

BG = if(Sales[Product]="Chairs","Red","White")
 
lbendlin_0-1622316676428.png

 

lbendlin_1-1622316856198.png

You can see some issues here - the totals are colored but the column header is not.  While you can fix the former, the latter is not yet something you can do dynamically (it's on the roadmap).

 
 

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Yes, usually you add calculated columns (sometimes also measures) to your data that contain the color code that corresponds to your condition (in the above case the product category column). Then you can apply conditional formatting "based on field value"

 

BG = if(Sales[Product]="Chairs","Red","White")
 
lbendlin_0-1622316676428.png

 

lbendlin_1-1622316856198.png

You can see some issues here - the totals are colored but the column header is not.  While you can fix the former, the latter is not yet something you can do dynamically (it's on the roadmap).

 
 

 

Anonymous
Not applicable

I can ignore hearer coloring. Thank you. It worked for values. 

 

I tried to fill blanks with 0 in same matrix. But the colors didn't apply to zero's. Is there a way to do that one too?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.