Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
AdamJaworski
Contributor
Contributor

Aggr rangesum

Please help with the aggregation function. I need to add up the months for the year cumulatively.
Below is the effect I want to get.

Month Year Cost Accumulate
01 2021 873 646,24 zł 873 646,24 zł
01 2022 975 894,97 zł 975 894,97 zł
02 2021 872 613,47 zł 1 746 259,71 zł
02 2022 1 127 169,20 zł 2 103 064,17 zł
03 2021 998 599,21 zł 2 744 858,92 zł
03 2022 1 443 874,39 zł 3 546 938,56 zł
04 2021 945 342,53 zł 3 690 201,45 zł
04 2022 982 992,69 zł 4 529 931,25 zł
 
Labels (1)
3 Replies
Davis69
Contributor III
Contributor III


@AdamJaworski wrote: Global Connect GM
Please help with the aggregation function. I need to add up the months for the year cumulatively.
Below is the effect I want to get.

Month Year Cost Accumulate
01 2021 873 646,24 zł 873 646,24 zł
01 2022 975 894,97 zł 975 894,97 zł
02 2021 872 613,47 zł 1 746 259,71 zł
02 2022 1 127 169,20 zł 2 103 064,17 zł
03 2021 998 599,21 zł 2 744 858,92 zł
03 2022 1 443 874,39 zł 3 546 938,56 zł
04 2021 945 342,53 zł 3 690 201,45 zł
04 2022 982 992,69 zł 4 529 931,25 zł
 

Aggr() returns an array of values for the expression calculated over the stated dimension or dimensions. For example, the maximum value of sales, per customer, per region. The Aggr function is used for nested aggregations, in which its first parameter (the inner aggregation) is calculated once per dimensional value.

AdamJaworski
Contributor
Contributor
Author

what function should i use?
vinieme12
Champion III
Champion III

=rangesum(Above(Sum(Cost),0,rowno(total)))

 

Refer these articles

https://community.qlik.com/t5/Qlik-Design-Blog/Accumulative-Sums/ba-p/1468010

 

https://community.qlik.com/t5/QlikView-Documents/Calculating-rolling-n-period-totals-averages-or-oth...

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.