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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Full Accumulation when selecting only one year

I'm creating a line chart using full accumulation.  This works great when all years are selected but when only one year is selected then the beginning months are not being accumulated so the values are incorrect.  How do I accomplish this?

3 Replies
Sokkorn
Master
Master

Hi,

Check this document to get start.

Regards,

Sokkorn

Anonymous
Not applicable
Author

Thank you! This document was helpful however I'm still getting the same results.  When I select only one year the January number does not include the values from the prior year in December.  Here is what I have. Any suggestions?

sum( aggr( rangesum( above( sum( {$<[acct month]>}  [Trans Amt]),0,12) ),[acct month]))

tresesco
MVP
MVP

Some basics:

See the following two expressions:

Sum( If(Year(Date)=vLastYear, Sales) : This expression works fine with no selection (all are selceted), because the all the dates in the scope, therefore you would get the previous year total sale. But, once you select any year (say 2013), the 2012 data is filtered out so out of scope and you do not get the previous year sales.

Sum({<Year = {'$vLastYear'}>} Sales) : This one (Set Analysis) handles the selection issue. It filters the data according to your expression and gives your desired result. You might want to learn more about set analysis, it's very helpful.

Note: vLastYear = Year(Max(Date))-1