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
Ranjeet_1989
Regular Visitor

Conditional Formatting on column chart

Hi,

I'm creating column chart in power bi and want apply conditional formating on both bars profits and Sales.

Like if Profit>=3000 then Green, Profit>=1000 then Amber, Profit <1000= Red

Like if Sales>=4000 then Green, Sales>=3000 then Amber, Sales<1500= Red.

There is no option on column formating tab.

Please help me on this.

Ranjeet_1989_0-1686823270454.pngRanjeet_1989_0-1686825493922.png

 

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @Ranjeet_1989 

Conditional formatting is not supported by multiple columns in the category.

It is also not effective in terms of data visualization.
Beyond that, it is difficult to compare anything beyond each pair individually,
We burden the user with another type of decoding by using conditional formatting that allows both sales and profit to appear in the same color.

Alternatively, you can use the table graph in the picture, which allows you to compare cities, compare sales and profits, and alert you to the circle's values that you need.

Ritaf1983_0-1687156952411.png

 

There are quite a few steps in creating, so I am attaching a link where you can download the file and follow my steps.
Link to a sample file 

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

View solution in original post

HI @Ranjeet_1989,

I test with your sample data but can't apply conditional color formatting on column chart with multiple value fields.
Perhaps you can take a look at Ritaf1983 's suggestion or try to manually plot the graph based on condition on script base visuals. (e.g. R, Python visuals)

Create Power BI visuals using R - Power BI | Microsoft Learn

Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn

Plot with conditional colors based on values in R - Stack Overflow
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @Ranjeet_1989 

Conditional formatting is not supported by multiple columns in the category.

It is also not effective in terms of data visualization.
Beyond that, it is difficult to compare anything beyond each pair individually,
We burden the user with another type of decoding by using conditional formatting that allows both sales and profit to appear in the same color.

Alternatively, you can use the table graph in the picture, which allows you to compare cities, compare sales and profits, and alert you to the circle's values that you need.

Ritaf1983_0-1687156952411.png

 

There are quite a few steps in creating, so I am attaching a link where you can download the file and follow my steps.
Link to a sample file 

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

v-shex-msft
Community Support
Community Support

Hi @Ranjeet_1989,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

CitySalesProfitMonth
Delhi70001500January
Mumbai56001400February
Kolkata6500900March
Chennai2800600April
Bangalore45001800May
Pune3000800June
Delhi1500400July
Mumbai1400700August
Kolkata900300September
Chennai600350October
Bangalore1800450November
Pune800100December
Delhi2000650January

HI @Ranjeet_1989,

I test with your sample data but can't apply conditional color formatting on column chart with multiple value fields.
Perhaps you can take a look at Ritaf1983 's suggestion or try to manually plot the graph based on condition on script base visuals. (e.g. R, Python visuals)

Create Power BI visuals using R - Power BI | Microsoft Learn

Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn

Plot with conditional colors based on values in R - Stack Overflow
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.