Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

filgomes
New Contributor II

Add values from the previous year to the following

Hello,

I am new to QlikSense. I have a table for which I have to count certain occurences for each year. Until that point it is fine. I am having trouble in adding the results from the previous year to the following year and so on... I saw an example here but I would only get results for the max year and the one before it (https://community.qlikview.com/thread/174599‌). Can you help me on how to achieve this?

Best regards,

1 Solution

Accepted Solutions
filgomes
New Contributor II

Re: Add values from the previous year to the following

Thank you all for your kind suggestions. Eventually I found a solution for my problem.

The suggestion from Stefan Wühl on the following thread worked perfectly for my data: Cumulative sum | Qlik Community

5 Replies
mdmukramali
Valued Contributor II

Re: Add values from the previous year to the following

Hi Filipe,

Can you attach Sample file.

for that we can help you in better way,

Thanks,

Mukram.

pradosh_thakur
Honored Contributor II

Re: Add values from the previous year to the following

I Guess you are talking about cumulative sum . one thread as such is this  . check out the responses in this thread  https://community.qlik.com/thread/286279


regards

Pradosh

Learning never stops.
OmarBenSalem
Esteemed Contributor

Re: Add values from the previous year to the following

do u have date field? Month etc?

if so,

do sthing as follow:

count({<date=,Year=,Month=,Quarter=, date={"<=$(=Max(date))"}>}YourMeasure)


Re: Add values from the previous year to the following

You have to declare variables as in From and To. And, Then you could re-attempt using set expression

Sum({<Field = {">=$(=AddMonths(Max(Field), -1)) <=$(=Max(Field))"}>} Measure)

Life is so rich, and we need to respect to the life !!!
filgomes
New Contributor II

Re: Add values from the previous year to the following

Thank you all for your kind suggestions. Eventually I found a solution for my problem.

The suggestion from Stefan Wühl on the following thread worked perfectly for my data: Cumulative sum | Qlik Community

Community Browser