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
sasdfasdfsad
Advocate II
Advocate II

Conditional Formatting for Data Bars color?

Using Data Bars on a matrix is very helpful, HOWEVER, it does not appear that there is a way to apply any conditional formatting to the color of the bar itself?
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#add-d...

 

Is there anyway to use conditional formating like how the background color can change?

I would like my bars to be green >=90%
yellow >=70% <=89%
red if <70%

I don't see anyway to accomplish that.

1 ACCEPTED SOLUTION
Royel
Solution Sage
Solution Sage

HI @sasdfasdfsad  you can achieve this by following this steps 

Step 1: Create a Percentage Column 

In here i have created this Profit% column 

Profit% = 
DIVIDE(
    [TotalProfit],
    CALCULATE(
        [TotalProfit],
        ALL(financials)  
    )
)

 

Step 2: Create a measure for conditional color 

Performance Color = 
SWITCH(TRUE(),
    [Profit%] >= 0.2, "Green",
    [Profit%] >= 0.15, "Yellow",
    [Profit%] < 0.12, "Red",
    "Gray"
)

This one is for your conditions 

Performance Color = 
SWITCH(TRUE(),
    [Your Percentage Field] >= 0.9, "Green",
    [Your Percentage Field] >= 0.7, "Yellow",
    [Your Percentage Field] < 0.7, "Red",
    "Gray"
)

Step 3: Create a visual and select your column for Conditional formating 

Royel_0-1758101127366.png

 

Step 4: Set you measure here 

Royel_1-1758101356940.png

 

Results: In my case i have update my conditions point to fit my data 

Royel_2-1758101420322.png

 

 

Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!

 

View solution in original post

5 REPLIES 5
v-priyankata
Community Support
Community Support

Hi @sasdfasdfsad 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@Cookistador @Royel Thanks for the inputs.

I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.

 

Hi @sasdfasdfsad 

I wanted to check if you had the opportunity to review the information provided by users. Please feel free to contact us if you have any further questions.

Hi @sasdfasdfsad 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.

Royel
Solution Sage
Solution Sage

HI @sasdfasdfsad  you can achieve this by following this steps 

Step 1: Create a Percentage Column 

In here i have created this Profit% column 

Profit% = 
DIVIDE(
    [TotalProfit],
    CALCULATE(
        [TotalProfit],
        ALL(financials)  
    )
)

 

Step 2: Create a measure for conditional color 

Performance Color = 
SWITCH(TRUE(),
    [Profit%] >= 0.2, "Green",
    [Profit%] >= 0.15, "Yellow",
    [Profit%] < 0.12, "Red",
    "Gray"
)

This one is for your conditions 

Performance Color = 
SWITCH(TRUE(),
    [Your Percentage Field] >= 0.9, "Green",
    [Your Percentage Field] >= 0.7, "Yellow",
    [Your Percentage Field] < 0.7, "Red",
    "Gray"
)

Step 3: Create a visual and select your column for Conditional formating 

Royel_0-1758101127366.png

 

Step 4: Set you measure here 

Royel_1-1758101356940.png

 

Results: In my case i have update my conditions point to fit my data 

Royel_2-1758101420322.png

 

 

Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!

 

Cookistador
Super User
Super User

Hi @sasdfasdfsad 

 

You can perform some conditional formatting:

Cookistador_0-1758048782551.png

 

My advice, would be to create a dax measure to achieve that

If you have some dummy data, do not hesistate to share them with us, we could create the dax measure for you 😉

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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
Top Kudoed Authors