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
sengyu
New Member

Bar chart with dynamic measures and different bar colors

All,

I have various measures that I want to show in a BAR chart where each bar represent a measure value.  The value of the measures changes with slicer selection.   I would like to also change the Bar color (for each meausre) based on the value of the measure.


The solutions I have tried so far has either one of the problems:

1) Bar chart working and value changes with slicer selection, but cannot change the Bar color (FX option not available), or

I would add the measure to a table and then add the table to the Y axis.  I can change the Bar color based on the value in FX.  The problem is that the measure value is static once it's added to a table and does not change with slicer selction.  

2) Bar chart working and can change bar color, but values does not change with slicer selection.

I would add the measures to the Y axis.  The bar value changes with slicer selection but I don't have option to change the bar color (FX not available).

I can solve this problem with a separate Gauge for each measure and they work fine.  However, I would like to save real estate on the page by presenting some as Bar chart instead because I have quite a few gauges.

I have also tried other approaches such as starting with a line chart then format as bar chart, or formatting values in a column of a table as "Bar" but they all have the same issues as above.


Please let me know if there's a solution to this.  Thanks in advance!

3 REPLIES 3
sengyu808
Regular Visitor

Does any body have any ideas or have run into this problem before? Thanks

Seng

v-kaiyue-msft
Community Support
Community Support

Hi @sengyu ,

 

I can not help you very well. Maybe you can provide me with your pbix file?

 

Please remove sensitive data and do not log in to your account in Power BI Desktop when uploading pbix files.

 

All this is to better solve your problems.

 

I would be grateful if you get back to me quickly.

 

Best Regards,

Clara Gong

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Clara,

 

Thanks for the reply.  To simplify my ask, I have created a simple pbix file. 

Link to test1.pbix 

 

To highlight what I am facing, I created a simple table that has two fields with values of 0.055 and 0.03 each.  I also created two measures (measure 1 and measure 2) with values of 0.055 and 0.03 correspondingly..

 

I can add a measure to a clustered bar chart and the Bars color does show the Fx option and I had created a rule for the measure to show as Green if it's below 0.05, red color otherwise.  However, that rule does not fire and the bar color remains the default blue color. Why?  I did one for Measure 1 and Measure 2 - same results.

If I add both Measure 1 and Measure 2 to a clustered bar chart, the bar shows the correct values but I don't get the FX button to customize the Bar colors.

 

If I add the table values, i.e., the "Value" field to X-axis and "Name" field to Y-axis.  I can customize the BAR colors nicely.  However, the "Value" field is static, meaning that it won't change it I were to implement a slicer.  I need a way to show measure values in a bar chart format, customize the bar colors and have the bar values change with a date slicer.  

 

Let me know if you need anything else.

Thanks

 

Seng

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.