Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
john_tremper
Contributor II
Contributor II

Running total/Running Balance

Happy New Year!

I am trying to create a report that shows the running total/balance as shown below and not having much luck.  A search on running total/balance will bring many results, not of which worked for me.  I have tried setting up a field in the script and it still does not work.  I have tried rangesum(), above(), rownno(total), and still unsuccessful.  Does anyone have a fool proof way of getting what's shown below?  It would be so easy to do in excel or SQL.  Thanks in advance!

 

CusNoCustomerTotal SalesRunning Balance
1abc55
2def813
3ghi316
Labels (2)
3 Replies
jwjackso
Specialist III
Specialist III

I tried this, 

=RangeSum(Above(Total RangeSum(TotalSales),0,RowNo(Total)))

 

Found here:

https://community.qlik.com/t5/New-to-QlikView/Running-Total-in-a-graph/td-p/1030658

john_tremper
Contributor II
Contributor II
Author

Hi JW,

Thanks for the reply.  I had already tried this one.  It just chugs away and times out.

jwjackso
Specialist III
Specialist III

In a straight table, the "Running Balance" would be column(2).  Try

=If(RowNo(Total) = 1,Column(1),Column(1) + Above(Total Column(2),1))

This would only aggregate 2 rows for every row instead of all the rows above the current row.