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!

CusNo     Customer     Total Sales     Running balance

1                 ABC                 5                        5
2                 DEF                  7                       12
3                 GHI                  12                     24

Labels (2)
3 Replies
zzyjordan
Contributor II

Re: Running total/Running Balance

Hi, John
Have you tried below expression?
RangeSum (above(sum([Total Sales]),0,RowNo()))

ZZ
john_tremper
New Contributor II

Re: Running total/Running Balance

Hi ZZ, thanks for the response.  I tried that solution and got the results shown in the attached file.  The field I want to do the running balance on is:  Total Balance.  The Running Balance field is labled:  ZZ.  I also tried:  RangeSum (above(sum([Total Balance]),0,RowNo()-1)) and got the results in the bottom portion of the report.

Thanks again!

 

zzyjordan
Contributor II

Re: Running total/Running Balance

Hi, John
Can you provide a sample qvf that reflect your issue?
ZZ