Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Ibrahim_shaik
Helper IV
Helper IV

How to align the Secondary Y axis with the Primary Y axis

Hi Power Bi Community,

 

I have a column and line chart and I have added the secondary Y axis but the values doesn't align with the Primary Y axis and it looks a bit off.

secondary y axis alignment.png

 

 

how to align both the axis.

 

please give a solution.

 

 

Thanks & Regards,

Ibrahim.

 

2 ACCEPTED SOLUTIONS

The other suggestion i could make is forcing each primary and secondary axis to have set max and min values. That way you could detirmine what the interval sizes would be using a ratio.

View solution in original post

v-jiewu-msft
Community Support
Community Support

Hi @Ibrahim_shaik ,

First of all, many thanks to for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1712222879470.png

2.Drag the Year into the X-axis, drag the score into the column y-axis and drag the measure into the line y-axis.

vjiewumsft_1-1712222927051.png

3.Set the Y-axis maximum same with the Secondary y-axis and turn on the Align zeros.

vjiewumsft_2-1712222933246.png

vjiewumsft_3-1712222940648.png

4.The result is shown below.

vjiewumsft_4-1712222952564.png

 

Best Regards,

Wisdom Wu

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

View solution in original post

6 REPLIES 6
v-jiewu-msft
Community Support
Community Support

Hi @Ibrahim_shaik ,

First of all, many thanks to for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1712222879470.png

2.Drag the Year into the X-axis, drag the score into the column y-axis and drag the measure into the line y-axis.

vjiewumsft_1-1712222927051.png

3.Set the Y-axis maximum same with the Secondary y-axis and turn on the Align zeros.

vjiewumsft_2-1712222933246.png

vjiewumsft_3-1712222940648.png

4.The result is shown below.

vjiewumsft_4-1712222952564.png

 

Best Regards,

Wisdom Wu

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

Uzi2019
Super User
Super User

Hi @Ibrahim_shaik 

Based on you units it defines the ranges on y axis. 
I have taken same value on bar and line chart.

Uzi2019_0-1712039578652.png

 

 

It is properly displaying the unit ranges.

 

Let me know what exactly issue you are facing?

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
RossEdwards
Solution Sage
Solution Sage

I'd recommend disabling the secondary axis.  This will force the graph to align everything to the primary axis.

 

I'm assuming thats what you are trying to do?

Hi @Uzi2019 , @RossEdwards ,

 

In the image that i have posted you can see values 10, 20, 30 are not aligned to the primary axis grid line only 0 and 50 values are aligned. 

 

I want to align all the values.

The other suggestion i could make is forcing each primary and secondary axis to have set max and min values. That way you could detirmine what the interval sizes would be using a ratio.

Hi @RossEdwards ,

 

Sorry for the delayed reply.

 

Yeah as you said if i set the min and max values of both the y axis and Secondary y axis then the values align properly with the grid lines.

 

But my issue i cannot set both the axis min and max Y axis should be dynamic that is Auto and for Secondary Y axis i have to set min and max values.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.