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
Akahn
Advocate IV
Advocate IV

Force Single Y axis on combination charts

I have a bar/line combo chart. I want to force the visual to ONLY use a single Y axis. Can I force this behavior?

 

Right now when I hide the second axis, it doesn’t change the chart. For example, I will have a line value of -1 M and a bar value of 100K. In this scenario two axes are used. I choose to not display the second axis and the line doesn’t change relative to the bar. So now I have a y axis that goes to 150K or so and a -1M line value that appears to be within that range. This is very confusing. So I have to display both axes for the visual to make sense.

11 REPLIES 11
CallumTW
Regular Visitor

I have found a solution. However it is rather complicated!

I have used the custom formula for the maximum on each of the axies.

Maximum Formula select.PNG
I created a measure which calculated the maximum value for bar and line values and then prints the higher value therefore alsways printing the highest number shown on the graph:
Shared Y axis Measure.png
Then I call this in the formula section on both Primary and Secondary axies. As you can see below, this has worked for me...

Equal Y-Axies.PNG

CallumTW
Regular Visitor

Hi, I have same issue but this is on version Feb 22 and they don't seem to have this option.
This is my graph and as you can see it would be better represented if it used one axis for both fields.
Share Y axis.PNG
The only thing I could find is the on/off function for the secondary axis and all this does is hide it - this is USELESS!
No Secondary axis.PNG
Is there a way of forcing them to both use the same axis or ensure that both Primary and Secondary axies will always have the same scaling?

Hanson97
Frequent Visitor

For people still facing this problem i have found a solution !

1. Under "Y Axis" in format pane , you will see an option "Show Secondary". It will be defaultly in "Off" position even though a secondary axis is visible.

Hanson97_0-1640931313539.png

 

2. Here is the important part, switch the "Show Secondary' switch to "On"position and back to "Off" position. This will trigger the power bi visual to remove the secondary axis.

Hanson97_1-1640931481719.png


Power BI team should work on automatically switching the "Show secondary" switch to "On" position when a secondary axis is shown. But we manually switching it On/Off is triggering the required actions. 
Hope this helps! Mark this as solution to help others.

Thanks,
Hanson






 

Thanks, Hanson.  That worked perfectly for me.  I've been using MS tools long enough - I should have thought of this!

flaviotti
Helper I
Helper I

Exact same problem. Plus, it is also a problem that it is unpredictable. On the desktop version, when I use "column series" for the bar part, and use the individuals series for the lines, the chart always shares one Y axis. The same report, once uploaded on the service, unpredictably show one or two axis depending on the selection, and it is not clear the criteria followed.

For people still facing this problem i have found a solution !

1. Under "Y Axis" in format pane , you will see an option "Show Secondary". It will be defaultly in "Off" position even though a secondary axis is visible.

Hanson97_0-1640931313539.png

 

2. Here is the important part, switch the "Show Secondary' switch to "On"position and back to "Off" position. This will trigger the power bi visual to remove the secondary axis.

Hanson97_1-1640931481719.png


Power BI team should work on automatically switching the "Show secondary" switch to "On" position when a secondary axis is shown. But we manually switching it On/Off is triggering the required actions. 
Hope this helps! Mark this as solution to help others.

Thanks,
Hanson

awesome! thanks. I will give it a try! At the moment I had to add "ghost" bars to the max values of the data from both axis to "trick" the invisible secondary axis to be on the same range as the primary. I'll confirm if it works.

AnshulGupta
Helper I
Helper I

I am running into similar issue, in fact, this has got much worse with Zoom Slider.

The Zoom slider only zooms into the bars leaving behind the line plot at it's original position, making it look very weird.

No matter what I try, the line curve just doesn't use the same primary axis of bars, even though in my case the numbers for line curve are nearly of similar order than of bars.

 

Can anyone suggest how to enforce same Y-axis to be used by line curve as bars in Clustered Column Chart?

Turning off Secondary Axis does not help

I cannot fix min-max because there are many slicers and depending on which slicer one may choose, the numbers will change (still of similar order for line curve with bars/columns)

danielgergely
Advocate II
Advocate II

@Akahn@becsgy 

 

I just came across this question. it's quite old, but still not answered...

i found a sollution. What I did is:

1. Enabled secondary axis

2. checked alligne 0s setting

3. changed the range of my secondary axis to the min and max value of the primary y axis.

4. disabled secondary axis. 

 

After these steps the problem was solved.

 

hope it helps someone

 

 

Anonymous
Not applicable

Hi,

I'd like to bring this topic back to life because mentioned solution with aligning zeroes and axis range to min and max values of first axis by hand will work when You have just one thing to show. In my case though it is more tricky: I'm presenting measurements of different substances which have different units of measure on bars (one can be in mililiters, other in micrometers or something else; axis for one can span to thousands of units, for other tenth part of unit), line is used to present some limit value (like industry standard) to identify which samples exceeds this standard. 

So I need a way to adjust axis for line and bar chart to sale scale every time someone pick a substance.

becsgy
Regular Visitor

I have the same problem, even if I use slicers the filter the report.

Is there a solution to set the primary and the secondary y axis to display the same range? Even when I use slicers and the range changes.

Thank you.

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.