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
hwan
Frequent Visitor

Line and stacked column chart - Y-axis

Hello,

 

I am trying to do a line and stacked column chart to compare revenue and cost. My axis is month. I am thinking to use the line for revenue, stacked column for costA and costB(costA+costB = total cost). Unfortuntely in some cases the costs can be much higher than revenue. My question is how to make sure the scales of Y-axis for the line and the column are the same so the visualization represents the cost/revenue comparison correctly?

 

Thanks,

Hui

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@hwan You can do 2 things...

 

1) Enter start and end values to match the primary axis

OR

2) Turn off the secondary axis

 

Secondary Axis.png

 

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

Can you explain this a little more? There is only one Y-Axis for both the line and column series. Is the issue that the costs are so high as compared to revenue that you effectively see a flat line for revenue? Can you post an image and point out the issue? What would be your preferred outcome?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Sure.

 

1. this one below has only one Y-axis and the proportion is what I want.

 

image1.PNG

 

2. This one below has 2 Y-axises and the image is misleading. You can see that in July the total costs is abut $3M vs. $800k revenue while the chart might deliver a quite different impression at first look.

 

image2.PNG

 

Hope this makes sense,

Hui

Sean
Community Champion
Community Champion

@hwan You can do 2 things...

 

1) Enter start and end values to match the primary axis

OR

2) Turn off the secondary axis

 

Secondary Axis.png

 

I'll be honest, I don't think either of these solutions really resolves it. If you don't show the secondary y axis, the line will appear at the wrong level. If you fix the axis to specific ranges then they are not scalable for when you apply filters etc.

 

In Tableau you are able to 'synchornize axis', which is the right solution. I don't think this is available in Power BI it seems.

I experienced the same thing; that my secondary y-axis was still there (invisible) when I turned off the secondary axis and that the line wasn't aligned with the primary y-axis. But in my case it was because I hade set a start value (0) for my secondary axis before turning it off, as opposed to keeping it as Auto. Once I went back to Auto for the start value of the secondary axis it dropped the "invisible" axis and aligned with the primary one.

hwan
Frequent Visitor

Thanks Sean! Didn't know there is an option to turn off the secondary axis.

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.