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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Saghar
Frequent Visitor

Dynamic Y-axis range

Hello everyone,

I'm using line and clustered column chart in Power BI Desktop with a live connection to data source and some slicers.
The annoying thing is that the lines are shown on the columns which makes it difficult to read the data labels, I'm searching for a way to show the lines above columns so that they don't overlap. One solution is to change the Y axis range manually and say e.g. show only the range o to 100, BUT that doesn't solve it completely because once I change one filter via slicer 100 is smaller than maximum value and the chart gets messed up.
Does any one have a smart solution to adjust the start and end values of Y-axis dynamically?

Thanks in advance 🙂

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Saghar - Perhaps you could create a measure for your line that takes the maximum value in the columns and adds that to each of your line values and then turn off the secondary axis. What do you think of that?



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler thanks for the suggestion, the problem is that line and column measures have different formats (€ and %) and I can't think of a smart way to compare those two (to add the maximum of columns to the lines).
Do you have a solution to that as well? 🙂

Hi @Saghar ,

 

Maybe you can open the second Y axis for column chart and line chart.

And you can customize Data label to distinguish them.

Perhaps you can add a background to the Data label of the Column, the result like this,

 

dynamic1.jpg

 

If you have any question, please kindly ask here and we will try to resolve it.

 

Best regards,

 

Community Support Team _ zhenbw

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

amitchandak
Super User
Super User

@Saghar , I doubt there is a solution for that. Auto is one which not working for.

 

There a few solutions. multi-axis visual - idea for that

Line and Bar chart with Multiple Axis
https://ideas.powerbi.com/ideas/idea/?ideaid=cc9b1531-8ca4-48be-8035-b6dfc17af84f
https://ideas.powerbi.com/ideas/idea/?ideaid=aec20fda-edc4-466c-a9c0-2772011f6193

 

You can vote or create a new idea.

https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

You can explore some custom visual -

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors