Combo Chart Sync Primary and Secondary Y-Axis to same x-Axis
Dear Qlik Community,
I am trying to setup a Combo chart showing yearly sales development on a line and the YoY % Difference on the bar. Primary axis shows absolute Units Sold (Sum(UNITS_SOLD)), Secondary shows change in % (Sum(UNITS_SOLD) / above(Sum(UNITS_SOLD))-1).
The issue I have is, that both y-axis should cross the X-Axis at 0.
I understand that this can be achieved by adjusting the Min/Max range with an expression for both Axis but I am not sure how to achieve this exactly.
Change the Range on the Secondary Axis from Auto to Min/Max - and set the min to -6000 and the max to 6000; also you should set a min/max on your Primary axis as well; so that changed in the data don't affect it. Maybe a Min of -.5 and a max of .5 based on what I see in your chart.
If you wanted the min/max to still be dynamic you could do a formula to determine the max's in your data set.
ie . Min = -(ceil(max(sum[UNITS_SOLD]),1000)
Max = ceil(max(sum[UNITS_SOLD]),1000)
as long as the min and max are the same number but + & - your 0 point will be in the middle of the chart.