Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD expression for graph

Hi,

I would like to show on a combo graph :

my sales actuals and budget per month in column

my achievement to target YTD on a line.

I managed to do the achievement on a monthly basis with :

= sum(Actuals12)/sum(Sales2012Plan)

but this display achievement for each month only, not a cummulative YTD

how do I show for each month the YTD cummulative achievement

for month 2 for example :

(Month 1 actuals + month 2 Actuals) / (month 1 plan+ month 2 plan)-1 

Month 7 would be :

(Month 1 actuals + ....+ Month 7 actuals)/(Month 1 plan +...+ Month 7 Plan)-1

Currently if I use the Full accumulation option with the above formula it display beyond the last actual month...

Thanks

TD

1 Solution

Accepted Solutions
Not applicable
Author

I found the answer via an other forum on another related topic :

if(aggr(sum(Actuals12),Month)>0,

Rangesum(above(Sum (Actuals12),0,rowno()))/Rangesum(above(sum(Sales2012Plan),0,rowno())))

But while it works perfectly, I don t understand the concept of Rangesum(above(

Can someone explain it to me ?

Thanks

TD

View solution in original post

4 Replies
Not applicable
Author

On the expressions tab on your chart there is a box middle left you can tick full accum

Not applicable
Author

that is the box I was refering to. it shows data beyond the last actuals data. I would need to be able to limit the accumulation to the last actual data point

Not applicable
Author

also it cummulates the % for each month, not recalcute achievement to target for the sum of the months that are actuals :

it does :

sum(sum(actuals)/sum(plan))

instead of

(sum(actuals1) + sum(actuals 2)+...)/((sum(plan 1)+sum(plan 2)+...)

Not applicable
Author

I found the answer via an other forum on another related topic :

if(aggr(sum(Actuals12),Month)>0,

Rangesum(above(Sum (Actuals12),0,rowno()))/Rangesum(above(sum(Sales2012Plan),0,rowno())))

But while it works perfectly, I don t understand the concept of Rangesum(above(

Can someone explain it to me ?

Thanks

TD