Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there a function that gets the value out of the x-axis?
I need a graph that show the total sales of the month + the 3 previous months.
So on my x-axis i would put all my months and my expression would be something like this:
=sum({$<SalesMonth = {'<=ValueX-axis >ValueX-axis -4'}>}Sales)
Thanks in advance
hi,
have you tried the Accumulation functonality available on the Expression tab? This would get you a running total out of the box. The only downside is that the first 3 months in your case would not have the same weight as the following months.
I take it SalesMonth is your dimension shown along the x-axis? If this is the case using set analysis against the dimension field will not work as you need your set to be created for each row of the chart, or point on your x-axis, whereas set analysis will be evaluated once per expression. Your best bet would be a linked date table built in your script. For a whole discussion around this check this post:
http://community.qlik.com/forums/t/24521.aspx
and especially the answer from John Witherspoon to the later questions where he tackles your precise question. As ever his explanations are clear and precise.
hope this helps.