Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

set analysis year-1

Hello,

I would like to display value of the year-1 for a year selected i use this but this gives me the value of the year selected :

=sum({$<Year= {$(=Year(Today())-1)}>} ACCOUNTINGCURRENCYAMOUNT)

Thanks

omarbensalemstalwar1

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

=sum({$<Year= {$(=Max(Year)-1)}>} ACCOUNTINGCURRENCYAMOUNT)

View solution in original post

8 Replies
tresesco
MVP
MVP

Try like:

=sum({$<Year= {$(=Max(Year)-1)}>} ACCOUNTINGCURRENCYAMOUNT)

Chanty4u
MVP
MVP

check here max possible ways displayed

set analysis (max year and last year)

OmarBenSalem

Works fine for me !

How are you selecting ur Year? is it the same Year field u're using in this expression? Or u have another Year field (maybe calculated) ?

zied_ahmed1
Specialist
Specialist
Author

I changed the name of the field Year in the master calendar but same thing i have the same values for year and year-1

zied_ahmed1
Specialist
Specialist
Author

Same thing it doesn't work...

OmarBenSalem

Hold on a second :

in your expression, you're using one Year field; and then you're filtering by another Year field (the one from the master calendar) ?

Is that so?

tresesco
MVP
MVP

There could be many feasible reasons why it would not work. Try to share your sample qvw.

zied_ahmed1
Specialist
Specialist
Author

Yes I changed the name of field Year in Master calendar to Annee and this is the filter :

champs year.PNG

And this is the set analysis  :

set_analysis_year.PNG