Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
rlhardin
New Contributor III

Ending Balance Sum by Month

I am relatively new to Qlik and have the following data set

Header 1Header 2Header 3Header 4Header 5Header 6
Beginning balancetransaction dateMonthDebit CreditEnding Balance
1001/10/2017Jan1090
901/13/2017Jan30120
1201/26/2017Jan100220

I want to chart the ending balance for Jan and months following but instead of 220 I end up with 430.

Not sure of the right way to sum this.  Any advise is greatly appreciated.

Thank you

1 Solution

Accepted Solutions
vvira1316
Valued Contributor II

Re: Ending Balance Sum by Month

=Sum({<Month, [transaction date]>}[Beginning balance]) + Sum({<Month, [transaction date]>}Credit) -Sum({<Month, [transaction date]>}Debit)


Month may not be required, try following

=Sum({<[transaction date]>}[Beginning balance]) + Sum({<[transaction date]>}Credit) -Sum({<[transaction date]>}Debit)

2 Replies

Re: Ending Balance Sum by Month

Tri this

Sum(TOTAL heading4)

Life is so rich, and we need to respect to the life !!!
vvira1316
Valued Contributor II

Re: Ending Balance Sum by Month

=Sum({<Month, [transaction date]>}[Beginning balance]) + Sum({<Month, [transaction date]>}Credit) -Sum({<Month, [transaction date]>}Debit)


Month may not be required, try following

=Sum({<[transaction date]>}[Beginning balance]) + Sum({<[transaction date]>}Credit) -Sum({<[transaction date]>}Debit)

Community Browser