Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
neena123
Partner - Creator
Partner - Creator

How to accumulate in a Pivot table?

I want to show the accumulate by month per year in a pivot table. Is it possible? How would I accomplish this? I attached a photo of what my pivot table looks like. Basically a accumulation month over month.

5 Replies
sunny_talwar

So you want to accumulate across your months and not go down? Use ColumnNo() instead of RowNo() and Before/Atfer instead of Above/Below in your RangeSum() function

jayanttibhe
Creator III
Creator III

Hi -

You can use

For Counts

Rangesum(before(Count[Field]),0,12))

For Sum

Rangesum(before(Sum[Field]),0,12))


where - 0 is an offset and 12 is the "Counter" - assuming you want to accumulate it for 12 months. You may adjust it based on your need.



FYI


https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Inte...

neena123
Partner - Creator
Partner - Creator
Author

Yes I want it to accumulate across. So would I have 2 expressions? Currently I have SUM(Net Sales Amount).

jayanttibhe
Creator III
Creator III

Ok  then use

Rangesum(before(Sum[Net Sales Amount]),0,12))


I have just given examples of Sum and Count. You can use as per your need.

sunny_talwar

You can do what jayanttibhe‌ mentioned, or use this

RangeSum(Before(Sum([Net Sales Amount]), 0, ColumnNo()))