Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikuser222
Creator
Creator

Cummulative calculation

Hi Everyone,

I have a requirement where we need to calculate the cumulative value for the date slecetion.

For example:

Jan - 20

feb - 30

mar - 45

apri- 23

If user select Jan the value in text box should be 20

if user select Feb the value in text box should be  50 (Jan + feb )

if user select Mar - 95 (jan+feb+mar)

 

Can anyone please help me to solve this?

 

Thanks

Labels (1)
3 Replies
neelamsaroha157
Specialist II
Specialist II

Create a date field in your script.

Create a variable as vAsOfDate = Date(Max(Date))

Expression - =Sum({<Date = {'<=$(vAsOfDate)'} , Month = >}Value) 

If you have more time related fields then override them all.

Check the attachment.

Brett_Bleess
Former Employee
Former Employee

Did the post you received help you with things?  If so, be sure to return and use the Accept as Solution button on that post to give the poster credit for the help and to let other Community Members know that worked.  If you are still working on things and need further help, leave an update post.

You can try to have a look in the following area of Community to see if you can find something there to help too:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Not exactly sure what you need, so did not want to confuse things by posting anything that was not really related.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
jyotiwagde
Partner - Contributor
Partner - Contributor

I have created sample inline table

a:
load * inline
[
Monthly,Value,
Jan , 20,
feb , 30,
mar , 45,
apri, 23];

try this expression

=sum(aggr(RangeSum(Above(TOTAL Sum({$<Monthly>}Value),0, RowNo(TOTAL))),(Monthly)))