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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

9 REPLIES 9
aalooksth
New Member

I know there have been several updates but if this is still relevant and useful to anyone

 

-- Turn off values from the Secondary y-axis. This will force to use primary y-axis value.

 

Thanks.

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

I guess this won't work dynamically if filters applied to the chart? I'm a beginner with DAX but I presume there's a way of handling that?

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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