Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
fzalexanderjohn
Creator
Creator

Trouble summing up values in a date range

Hello,

I think my problem can best be illustrated with this example.

I have data like this:

MonthIncoming Stock
110
220
330
412
55
660
73

 

What I want to do is having a sum for the entire incoming stock values that are newer than the value in the current row. So for the first row it would be the sum of values of incoming stock for months 2 to 7. The resulting table should be like so:

MonthIncoming StockTotal Incoming
110130
220110
33080
41268
5563
6603
730

 

Ideally this should be in the load script. But a solution as a measure would also work. Currently I don't really know how to approach this.

Labels (1)
1 Solution

Accepted Solutions
fzalexanderjohn
Creator
Creator
Author

Update, I found the solution. This measure works in the example above:

 

rangesum( below( sum([Incoming Stock]),1,NoOfRows()))

View solution in original post

1 Reply
fzalexanderjohn
Creator
Creator
Author

Update, I found the solution. This measure works in the example above:

 

rangesum( below( sum([Incoming Stock]),1,NoOfRows()))