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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
joshua1990
Post Prodigy
Post Prodigy

End of Y-Axes based on Measure

Hi!

I have a bar chart that shows me the value for a measure per week.

I would like to limit the End of the Y-Axes based on the MAX value within the full range of all weeks.

For instance, if the value for the latest week is 5.000 and week 20 = 10.000, then the Y-Axes should end at 10.000.

How would you do that using a measure within the Y-Axes settings?

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @joshua1990 ,

 

Try what the @Greg_Deckler  said. You could create a measure like below:

Measure = MAXX(VALUES(financials[Country]),CALCULATE(SUM(financials[Profit]),ALLEXCEPT(financials,financials[Country])))

In this formula, my x axis is financials[Country].

Vlianlmsft_0-1636696550839.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@joshua1990 There should be a small fx button next to the Start and End values for Y-Axis in column charts and the X-Axis in bar charts. You could write a simple measure, MAX('Table'[Column]) to set the max or min value. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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