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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

omarbensalem‌ stalwar1‌

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try like:

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

View solution in original post

8 Replies
tresB
Champion III
Champion III

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
Partner - Champion II
Partner - Champion II

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
Partner - Champion II
Partner - Champion II

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?

tresB
Champion III
Champion III

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