Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
john_tremper
New 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
Valued Contributor

Re: Running total/Running Balance

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
New Contributor II

Re: Running total/Running Balance

Hi JW,

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

jwjackso
Valued Contributor

Re: Running total/Running Balance

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.