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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Matthijs1234566
Frequent Visitor

Conditionally formatting chart

Hello,

 

I want to format my chart in two colours, red and green. 

In one column there are three options to select. For the options cXML and Online is a positive bar in green needed, and red if the percentage is negative. For the paperinvoice it is the opposite. Green bar if the percentage is negative and red if the bar is positive.

 

How do i fix this?

 

GraphGraphSortSort

4 REPLIES 4
Matthijs1234566
Frequent Visitor

Hello,

 

I cant share the PBI file, because it contains copmany data. I have made an Excel file, with random data. 

One measure is needed what the difference is between the quarters for each method how many invoices there are. For cXML and Online it have to be red if the percentage is negative and green if it is positive. If the Paperinvoice percentage is negative it must be green and if the percentage is positive it must be red. I hope you have enough information.

 

The difference have for each quarter needs to be in a bar chart


https://we.tl/t-JI9YFqhada 

perarajahkumar
New Member

Hi Matthijs,

 

There are two ways to solve this issue. Click on your graph and select the format option on the right side of your screen. You could set rules for data labels by clicking on the (fx) button. Change the format style to rules and choose the appropriate field on which you would like to base your rules.   

 

Hence you could say if < 0  percent then (color) red etc...

 

Follow this link for more help: https://community.powerbi.com/t5/Desktop/Conditionally-format-bar-chart-column-colour-based-on-slice...

 

Adjusting this slightly will help solving your issues. 

Goodluck

This is not the right answer. I have three options: 

Matthijs1234566_0-1641554481427.jpeg

In one column there are three options to select. For the options cXML and Online is a positive bar in green needed, and red if the percentage is negative. For the paperinvoice it is the opposite. Green bar if the percentage is negative and red if the bar is positive.

 

The graph has a dynamic title

Initially I misunderstood your question. If you could share your pbix file, I can help you out with this. 

I just have to try a few DAX to solve it. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors