Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find an opening balance

I need to sum all transactions which took place prior to the current year in the starting balance column of the attached example application but only If the project has a transaction amount in the current year. If no transaction is present in the current year then the starting balance should be 0. The field should be dynamic so if a previous year is selected the same rules will follow.

Thank you for your help

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you! What a genius solution.

I had to alter the expression ever so slightly to get exactly what was required

altered from:

( {< ProjectCode= p( {<TransactionYear={$(=max(TransactionYear))}>} ),TransactionYear={$(=max(TransactionYear)-1)}>}TransactionAmount)

To:

( {< ProjectCode= p( {<TransactionYear={$(=max(TransactionYear))}>} ),TransactionYear={ "< $(=max(TransactionYear)-1)" }>}TransactionAmount)