There is no way to reference the Max from within a chart in qlikview (as far as I know). So the solution here would be to set the max manually, and then use the same function to set your reference line.
To set a "manual Max" you will need to max using the aggregate function over the dimension, containing the same expression for that axis. For example if your Y expression is "=sum(Amount)" and your dimension is "Month" then your function would look like:
I also X by 1.1 or some arbitrary amount so that the greatest figures are not exactly on the edge of the chart. I also use the ceil function to round the max to the nearest figure:
Each reference line would use this formula, divided by 2.
In addition to using a reference line, you could aslo use gridlines and set the step to [the maximum for that axis]/2. This would add flexibility if you wanted to specify a different number of lines in the future.
Hope this helps,
I was using kind of the same expression, but wasn't sure whether there was a better solution or no. But the use of ceil is pretty smart, at least if you know all the ranges you'll go through.
I finally will only use the "max(aggr..." expression, multiplying by a 1.15 coefficient and of course divide by 2 for the reference line.