Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cranium144
Creator
Creator

Running Total with Supply and Demand in a Pivot Table

I've seen where RangeSum() coupled with Above() works to keep a running total.  I'm currently attempting to using this function:

RangeSum(Above(sum([Supply Qty]),0, RowNo()))

In the attached file, I have a pivot table with the week number is across the top with the part number down the left side.  I was expecting the totals to accumulate.  So week 36 to be 20,000, week 38 to be 46,000 and week 40 to be 66,000.   Instead I'm getting just the supply quantity for that week.

My end game will be to have a demand on the top line, the supply below that with the running on-hand values for each part number (along with a calculation to give current months on-hand). 

So my question, can you tell me where I am going wrong with getting the numbers to add?

Thank you.

Rick

1 Solution

Accepted Solutions
cranium144
Creator
Creator
Author

All, looks like I figured it out.  I was using functions for vertical.  I switched to Before() and ColumnNo() and it worked.

View solution in original post

2 Replies
cranium144
Creator
Creator
Author

I did find that the summation works if the week numbers are down the left side.  But I would like to get the summation to work across the row.  Thoughts?

RangeSum in a PivotTable2.jpg

cranium144
Creator
Creator
Author

All, looks like I figured it out.  I was using functions for vertical.  I switched to Before() and ColumnNo() and it worked.