Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Is it possible to force both the columns/bars and the line to use the same y-axis (or lock the primary and secondary y-axis scales to be the same)?
I'm able to make both of them start (min) from 0.
It's the top end of the scale (max) which can't be hard coded b/c there are slicers which require a dynamic scaling.
Solved! Go to Solution.
Hi , @Anonymous
After my research,all we can do now is to fine-tune the following parameters in the visual format to get the result we want.
Before:
After:
In addition , you can come up with/ vote for a idea and add your comments there to make this feature better. https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Best Solution
Create a measure to use as the upper (and lower if needed) limits of both axis. Set that measure to the sum of whatever will be in your chart (multiplied by some factor for spacing: 1.3?)
I think a lot of people looking for a solution on this topic might benefit from this solution: Solved: I would like to create a bar graph with a target l... - Microsoft Power BI Community
It worked for me!
Highlighting a field by using a line graph is surely a very common use case - profit per revenue in this example - or in my case a target line. You probably don't want to have to set manual limits to two sets of axes - you just want to use the same axis.
This illustrates the problem. I have online sales as the bar chart and target percent as the line graph. They are obviously on the same scale but here, Power BI has decided to use 0-100% on the left axis and 12-18% on the right axis - making the line meaningless..
You can use the formula button and set the max for both to the same field value from the data table. They should be in the same scale after. You choose to turn on or off the secondary axis depending on your preference.
Agreed, that is the same solution I came up with and it works perfectly.
Hi , @Anonymous
After my research,all we can do now is to fine-tune the following parameters in the visual format to get the result we want.
Before:
After:
In addition , you can come up with/ vote for a idea and add your comments there to make this feature better. https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
What if you do not want to keep a fixed End for both Y-axis?
The way I get around this is to create a measure that finds the max column value in the visual using CALCULATE, MAXX, and ALLSELECTED then add like 20% to that and set the max of both the y-axis and secodnary y-axis to that measure.
@Anonymous unfortunately you cannot have dynamic scaling, either you have to manually enter a value which you know will not work or you have to work with the default scale. I think there is an idea on the ideas forum in which you should vote if there is none, create a new idea.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
139 | |
70 | |
67 | |
52 | |
52 |
User | Count |
---|---|
210 | |
92 | |
64 | |
59 | |
56 |