Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
syedShoaib
New Member
New Member

Need help in creating cumulative subtraction logic in Pivot Table

Hi Qlik Experts,

I’m working on a requirement where I need to segregate my values in a pivot table such that the values get subtracted step by step across dates.

For example, I have a measure [TOTAL] and daily consumption values. I want my pivot table to behave like this:

TOTAL 8/19/2025 8/20/2025 8/21/2025
4000 4000-1000 3000-500 2500-1000

Which should finally result in:

TOTAL 8/19/2025 8/20/2025 8/21/2025
4000 3000 2500 1500

The tricky part is that I want this logic to work inside a pivot table, so the values reduce sequentially (cumulative subtraction) as we move across dates.

Has anyone implemented a similar logic before?
What’s the best approach in Qlik Sense (set analysis, RangeSum, Above, etc.) to achieve this?

Any guidance or example expressions would be highly appreciated.

Thanks in advance!

Labels (5)
1 Reply
Or
MVP
MVP

It isn't clear what your data looks like, but this seems like a regular cumulative sum except you have negative numbers instead of positive?

Have a look at e.g. https://community.qlik.com/t5/App-Development/Cumulative-Sum-with-Two-Dimensions-in-a-Pivot-Table/td...