'power bi: dynamic y-scale values based on data

I'm building a dashboard in power bi and I have a dataset with a few percentages. There are several categories of data, but only one category is shown at a time. What I want to do is to dynamically change the y-axis values to reflect the data. At the moment, it's done automatically, but it makes the data look "worse" than it is, so I want to take the min and the max for that one category and add let's say another 10-20% to it, and use those values as the new scale. For example, if my data starts at 41% and ends at 63%, power bi automatically scales the chart between around 40% and 65%. I want to take these values, add 10% on each side and have the chart start at 30% up to 75% (roughly).

Is there a way to do this?

Thanks



Solution 1:[1]

If your visual is a line diagram then you can solve it by adding two additional measures to the plot:

y_top = MAX([pct_measure])+0,1
y_bottom = MIN([pct_measure])-0,1

Add both to the line diagram and then set their line widths to 0.

It's a variation of this:

Power Bi Tips - Center X-axis on a line chart

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OscarLar