cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
schittineni
Frequent Visitor

both bars and lines to use same scale in Y-axis

we are having both bar and lines on same graph, but line is not using scale on Yaxis it is independent of scale bar garph is using. Is there a way for bar and line to use scale on Y axis.

 

schittineni_0-1592931625409.png

 

7 REPLIES 7
rodrigo_antonio
Regular Visitor

What I do and works for me its the right formula in max ou min values of both Y axis:

 

axys Max = MAX(table[column])*1.1
axys Min= Min(table[column])*0.8
 
Works with positive values, if you have negative values just change the * parameters
v-zhenbw-msft
Community Support
Community Support

Hi @schittineni ,

 

We have a little confused about your issue.

In your screenshot, line and column share a same Y axis. Or do you want to show the line value of 2020/3/14 to 2.23bn format when your click column? If our understand is correct, Y axis will show the Thousands, Millions or Billions based on your data, you also can configure it by yourself. But you cannot show the same result in Tooltip like your screenshot.

 

Both1.jpg

 

If it doesn't meet your requirement, could you please provide a mockup sample based on fake data?

It will be helpful if you can show us the exact expected result based on the tables.

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

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.

In the screenshot above value for week of 3/14 is less than billion, it is 0.2 billion. But it is showing line graph at 2.0 Billion of Y axis scale, which is wrong.

 

Users are not happy about lines showing in wrong place of Y -axis scale. stacked bar chart is using Y axis scale and it is showing right according to scale.

 

Let me know if i am still missing explanation. 

 

 

 

Hi @schittineni ,

 

Sorry for that the Y axis scale is based on the whole data number, it doesn't distinguish between Line and column.
What is the Y axis scale on the left in the screenshot? 

Maybe you can configure the Start and End.

 

Both2.jpg

 

Or you can use show secondary Y axis function.

 

Both1.jpg

 

If it doesn't meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

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

@schittineni , Not very clear.

Refer, this, You can choose one primary or secondary y-axis for line

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Thank you for your response Amit, 

 

Users doesnt want to use secondary scale on Y axis for line graph, they want both bar and line to leverage same scale on Primary Y-axis.

Did you found your answer? I had the same issue as you, when I am trying to plot a target vs actual combo chart. The target and actual uses a different y axis, I needed them to align to see the gap in differences.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.