14 Replies Latest reply: Mar 10, 2015 10:23 AM by Rakesh Ranjan

# How to sum all last year

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

• ###### Re: How to sum all last year

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

• ###### Re: How to sum all last year

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

• ###### Re: How to sum all last year

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

particular for item 1033

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

• ###### Re: How to sum all last year

For this year...use

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

• ###### Re: How to sum all last year

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

• ###### Re: How to sum all last year

i use this

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

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

• ###### Re: How to sum all last year

Try using this for your variable Y1

and instead of matching it with a Date field, create a year field in the script and match it with that year field (you might be able to simplfy your variable once you create a year field).

Best,

S

• ###### Re: How to sum all last year

if my date format is 'MM-YYYY' it ok? if ido that?

• ###### Re: How to sum all last year

for that you need to convert data format.

• ###### Re: How to sum all last year

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.

• ###### Re: How to sum all last year

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

• ###### Re: How to sum all last year

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

• ###### Re: How to sum all last year

i use this

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