Showing results for 
Search instead for 
Did you mean: 
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 🙂

Super User IV
Super User IV

@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?


@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

@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,




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.

Super User IV
Super User IV

@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


You can vote or create a new idea.

You can explore some custom visual -


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources


Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors