Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to sum all last year

I want to sum all last year.what should i do.

14 Replies
MK_QSL
MVP
MVP

What do you mean by all last year... What you want to sum ? please explain in brief.... Thnx

puttemans
Specialist
Specialist

Please give the community more information on where, with what variables etc.... If you are too general, no-one will be able to help you in a fast and correct manner.

sunny_talwar

I would flag the last year in the script itself and use that within the set analysis to calculate the sum for last year:

=Sum({<LastYearFlag = {'Y'}>} Value)

HTH

Best,

S

datanibbler
Champion
Champion

Hi Chat,

not too much information, please. That would make it too easy for anyone to help 😉

Do you want to do that in the script or on the GUI?

Basically, in the script you can do that in an aggregation. On the GUI, you can use Set_analysis.

Best regards,

DataNibbler

Not applicable
Author

I have some item. Ex item 1033.I want to some QTY every last year until now.Please.

MK_QSL
MVP
MVP

SUM({<Year = {'$(=Year(Today()-1)'}>}Qty)

particular for item 1033

SUM({<Item = {'1033'},Year = {'$(=Year(Today()-1)'}>}Qty)

MK_QSL
MVP
MVP

For this year...use

SUM({<Year = {'$(=Year(Today()))'}>}QTY)

puttemans
Specialist
Specialist

Do you have a sampe of the data, and possibly a dummy of what you'd like to achieve with it?

Not applicable
Author

i use this

sum( {$<IvAndTar_YearINVOICEDATE={'$(Y1)'} >} IvAndTar_IV_QTY )

Y1==date(AddYears(date#(IvAndTar_YearINVOICEDATE,'YYYY'),-1),'YYYY')

that code just sum last one year can you suggest me how can i sum all last year.