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
crawfe
Helper I
Helper I

Variable Y axis scale based on slicer?

Hi. I ama relatively new user....Is there a way to set the Y axis scale of a bar/line chart, based on a slicer choice? I have widely varying data maximums based on a slicer. I could leave the scale auto but I need my bar and line to use the same axis values (for example a data bar and a target line). Is there a way to set the scales to be the same AND vary by slicer? 

  I hope this is a good enough description. A solution for either aspect would be appreciated..Thanks! 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@crawfe , there is no option to set the Y-axis scale by a measure or variable. Automatic is just an option that can reset the scale based on changes

View solution in original post

5 REPLIES 5
mahoneypat
Employee
Employee

You could use the value of a slicer in a measure where you divide your original result by the slicer value and turn your Y axis into % of slicer value.  If you then fix the Y axis to a max of 1, you would get a zoom in effect with slicer changes.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I am not sure that I could use that view but clever! 

amitchandak
Super User
Super User

@crawfe , there is no option to set the Y-axis scale by a measure or variable. Automatic is just an option that can reset the scale based on changes

OK Too bad. Thanks. Why is there no way to select an option to sync the Y and Y2 axes? That option has been requested for years and seems pretty straightforward. 

I didn't find a way to explicitly set the Y and Y2 axes to sync, but I found that if I turn off Secondary axis (and title) and set the Y2 axis scale to auto-auto (Both needed!), and the Y axis to 0-Auto, the Y2 axis seems to track the Y axis. So this gets me past the slicer big difference problem. Thanks for giving it thought! 

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.