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!

CusNo     Customer     Total Sales     Running balance

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

Labels (2)
3 Replies
zzyjordan
Creator II
Creator II

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

ZZ
john_tremper
Contributor II
Contributor II
Author

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
Creator II
Creator II

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