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
Petr_M
Frequent Visitor

Dynamically calculated Y axis maximum (extra space over max displayed value)

I have a measure.

 

 

Ratio = sum(Table[A])/sum(Table[B])

 

 

I want to plot the Ratio in a chart that has an Y axis with the following idea:

 

 

MaxY = max(Ratio)*1.3

 

 

so that the maximum value has extra space obove regardless any slicers applied.

Seems simple but I was unable to find the solution so far.

Thanks a lot!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Petr_M , Using the column used on x-axis

 

MaxY = maxX(Values(Table[Col]) ,[Ratio])*1.3

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Petr_M , Using the column used on x-axis

 

MaxY = maxX(Values(Table[Col]) ,[Ratio])*1.3

If I may have one more question, @amitchandak , is it possible to also modify the formula so that it looks at A instead of Ratio? If simply replaced like this:

MaxY = maxX(Values(DimCalendar[Ultimo]) ,Table[A])*1.3

I get an error message: "A single value for column 'A' in table 'Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

I tried to fix it by adding a sum, but it seems to sum also over all ultimo values.

Thanks.

Works like a charm! Thanks a lot, @amitchandak!

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.