Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Year To Date Accumulation Expression

I am trying to show average cost per member per month in a bar chart and I want to show this as a year to date figure.  For example, for March, I would want an expression that would show this:

(January Cost + February Cost + March Cost) / (January Members + February Members + March Members)

I see where I can click 'Full Accumulation' but this just calculates it this way:

(January Cost / January Members) + (February Cost / February Members) + (March Cost / March Members)

So I essentially want to change the order of operations and I am guessing there is a way to do this in the expression formula.  Does anyone have an idea?

12 Replies
Not applicable
Author

This still isn't working correctly.  I think it is working for month 2 but not for any of the other months.

Not applicable
Author

Here you go, works now, this time I put it through a more vigorous qa process;)

I've used the rangesum function to do it, quite useful, please find a good explanation here:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums

Qvw is attached.

Best,

Matt

Not applicable
Author

This works great!  Thanks so much for your help.

Craig