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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
kevbrown
Creator II
Creator II

Balance Sheet & Last Year

Please find attached sample QVW.

I'm trying to create the sum for "Balance as at last year", depending on which As At date has been selected. I'm sure it's easy

Kev

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

You can use the AddYears function and also better to use set analysis instead of if like this:

=sum({<[As At]={'$(=AddYears([As At],-1))'}>}Balance)

View solution in original post

3 Replies
stigchel
Partner - Master
Partner - Master

You can use the AddYears function and also better to use set analysis instead of if like this:

=sum({<[As At]={'$(=AddYears([As At],-1))'}>}Balance)

kevbrown
Creator II
Creator II
Author

Superb, thank you

stigchel
Partner - Master
Partner - Master

You're welcome...

Maybe also add a e.g. Max to that expression for when nothing is selected:

=sum({<[As At]={'$(=AddYears(Max([As At]),-1))'}>}Balance)