Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous year figures

I have a problem with my expression to populate purchases amount for the previous year, sum({$<Year={$(=Only(Year)-1)}>}LineTotal)  . The one to get current year figures sum({$<Year={$(=Only(Year))}>}LineTotal) is working perfectly fine.Can someone assist me in fixing this.

3 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

I have checked your expression and it is working fine for me.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try with this expression

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

Regards,

jagan.

Not applicable
Author

Thanks, let me try it