Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

david_ze
New Contributor III

Aggregate data for the last 12 months

Hi All,

I'll appreciate your prompt assistance on an issue I have.

I have a table which has the following fields:

Date, Transaction_Type, Amount

I would like to aggregate the last 12 months amount for each Transaction_Type on a monthly basis

i.e

for the 31/01/2012 the sum of the amount from 1/2/2011 to 31/01/2012

for the 28/2/2012 the sum of the amount from 1/3/2011 to 28/2/2012

all of this should be for each Transaction_Type.

Thanks in advance.

David

5 Replies
francisvandergr
Contributor II

Re: Aggregate data for the last 12 months

You can work with accumulation at the expressions tab i think. Otherwise you have an example ?

david_ze
New Contributor III

Re: Aggregate data for the last 12 months

I would like to do this within the script

nirav_bhimani
Contributor III

Re: Aggregate data for the last 12 months

Hi,

try this expression, It will show the result as you want.

sum  ({ <InvoiceDate =   P(  { <InvoiceDate ={">=$(=(Max(InvoiceDate)-365) ) <= {<CalendarYear={$(=max(CalendarYear))},CalendarMonthName={$(=Month(Max(InvoiceDate)))}>}"}>} ) >} InTotRs)

Regards,

Nirav Bhimani

david_ze
New Contributor III

Re: Aggregate data for the last 12 months

within the script please

Not applicable

Re: Aggregate data for the last 12 months

HI David,

Can you Give the me the Solution Which I got the Same Req, Right now, Can you please help me on this....

Regards,

Helen

Community Browser