# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for
Did you mean:
Contributor II

## Cumulative till month 12 of a year, and the reset the cumulative since month 01 of the following year

Let me give you another example, which is what I'm trying to get:

Data:
Date,Value
201810,22
201811,22
201812,10
201901,14
201902,18
201903,18
201904,21
];

Final:
NoConcatenate
Date,
Value,
if(Date >= '201901',RangeSum(Value,Peek(Valuee))) as Valuee
Resident Data
Order by Date;

Drop Table Data;

These are the result sets. The cumulation starts from 201901, therefore the condition I made in the final tabla. Nonetheless I also need the cumulation from 201810 til 201812.

How do I do this?

Labels (4)

• ### Set Analysis

1 Solution

Accepted Solutions
Partner - Creator III

I think you will need this.

``````Data:
Date,Value
201810,22
201811,22
201812,10
201901,14
201902,18
201903,18
201904,21
];

Final:
,	 Value
, 	 if(Previous(Year)=Year,RangeSum(Value,Peek(Valuee)),Value) as Valuee
;
NoConcatenate
left(Date,4) as Year,
Date,
Value
Resident Data
Order by Date;

Drop Table Data;``````
3 Replies
Partner - Creator III

I think you will need this.

``````Data:
Date,Value
201810,22
201811,22
201812,10
201901,14
201902,18
201903,18
201904,21
];

Final:
,	 Value
, 	 if(Previous(Year)=Year,RangeSum(Value,Peek(Valuee)),Value) as Valuee
;
NoConcatenate
left(Date,4) as Year,
Date,
Value
Resident Data
Order by Date;

Drop Table Data;``````
Contributor II
Author

Thank you so much!

Partner - Creator III

You're welcome!

Regards Eddie

Tags
Community Browser