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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
16kernse
Frequent Visitor

Changing the Color of Data Bars in a Matrix

I'm trying to change the data bar colors in my Matrix, based on what column they fall in. Less than 15 = Green, Between 15 & 25 = yellow, and More than 25 = red. This is independent of invoice count or invouce amounts. In the below screenshot, you will notice I have been able to do what I want with icons, but I want to change the color of the databars, instead. Icons allow us to base the rules on another field, where data bars only let us change to colors based on the individual record. Is there a work around, or is this just how data bars work? I find it odd this functionality would exist for icons, but not data bars.

 

I want to apply icon rules to data bars and remove icons altogether

16kernse_1-1656440711739.png

 

icons rules, works

16kernse_2-1656440866411.png

data bars rule, doesn't work

16kernse_3-1656441048006.png

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi  @16kernse ,

I created some data:

vyangliumsft_0-1656639052839.png

Here are the steps you can follow:

1. Create measure.

color1 =
SWITCH(
    TRUE(),
    [invoice_count] >=1&&[invoice_count]<=3,"green",
    [invoice_count] >3&&[invoice_count]<=6,"yellow",
    [invoice_count] >6&&[invoice_count]<=10,"red")
color2 =
SWITCH(
    TRUE(),
    [invoice_amount] >=1&&[invoice_amount]<=3,"green",
    [invoice_amount]>3&&[invoice_amount]<=6,"yellow",
    [invoice_amount]>6&&[invoice_amount]<=10,"red")

2. In Format - Conditional - set [invoice_amount] and [invoice_count] respectively.

vyangliumsft_1-1656639052840.png

3. Go to Background color – invoice_amount.

Format style – Field value

What field should we base this on – [color1]

vyangliumsft_2-1656639052841.png

4. Go to Background color –invoice_count.

Format style – Field value

What field should we base this on – [color2]

vyangliumsft_3-1656639052842.png

5. Result:

vyangliumsft_4-1656639052842.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi Liu. Thanks fo your response, but I'm trying to do this in data-bars and not the background color. Also, I am wanting the whole columns to be one color. Less than 15 = green, between 15 & 25 = yellow, more than 25 = red, regardless of invoice amount and invoice count. I'm trying to use the icon logic in the colors of the data bars, but i'm not convinced this is possible.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors