Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all,
I'm currently trying to do a conditional formatting which compares two bars within a bar chart.
Example: I'm sales manager, reviewing the sales targets in thousand € and the achieved sales in thousand € per shop.
I would like to get a quick overview about the best shops. Example below shows the target visual with Shops on the X-Axis and the Sales on the Y-axis.
You can see that the target sales value bar is always the same colour and the achieved sales bar is conditional formatted based on the target. If Sales was achieved, the bar is green, otherwise it is red. Moreover, the whole visual is sorted ascending by the "highest achiever shops."
I tried to implement this use-case in PowerBI but does not work. Using only the achieved value bars, I can do conditional formatting in Columns -> Default. So I would see only the achieved bars and they are green / red filled.
As soon as I add the Target values to the Y-axis the conditional formatting for the achieved bars (green/red) drops and I see the following.
So visual will look like this:
I could use the "Line and stacked column chart" and put the goal values on the Line Y-axis but this would not fully fit the requirement. Any solution to this topic?
@PhilipTreacy new discussion opened for topic https://community.fabric.microsoft.com/t5/Desktop/Conditionally-format-bar-chart-based-on-another-fi...
Solved! Go to Solution.
Hi @OneHotEncoder,
You cannot use condittional formating for a bar chart with two measures or a legend on it since each one will get it's singular color.
Have you tried using the error bars?
In this example I have create a combo of line and bar chart.
Using the error bars was abble to create this look and feel:
Se PBIX file attach.,
This is only one workaround there are some custom visuals that allows this.
Other option can be to create a staked column chart that has each level of the values until your target or above your target.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @OneHotEncoder,
You cannot use condittional formating for a bar chart with two measures or a legend on it since each one will get it's singular color.
Have you tried using the error bars?
In this example I have create a combo of line and bar chart.
Using the error bars was abble to create this look and feel:
Se PBIX file attach.,
This is only one workaround there are some custom visuals that allows this.
Other option can be to create a staked column chart that has each level of the values until your target or above your target.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsStarting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
86 | |
85 | |
67 | |
49 |
User | Count |
---|---|
139 | |
113 | |
104 | |
64 | |
60 |