Discussion Board for collaboration on QlikView Scripting.
I'll appreciate your help on a issue I have.
I have a transactions data which contains the fields:
Date, Transation_Type, Amount
The first date is 01/01/2002.
I would like to aggregate the transctions to be like this:
We need to see the total amount at the end of each month for each Transaction_Type, i.e:
At the end of each month we should see the aggregated ammount of each Transaction_Type from 01/01/2002 (the 1st date).
I'll appreciate you prompt advise on how to do this.
Go to Solution.
you could first aggregate your Values grouped by Month and Transaction_Type, then aggregate the MonthlyValues per TransactionType (or the other way round, should end up the same):
LOAD Date(MakeDate(2011)+floor(RAND()*720)) as Date,
RAND()*10 as Value,
chr(65+floor(RAND()*3)) as Transaction_Type
LOAD MonthEnd(Date) as Month,
sum(Value) as MonthlyValue,
group by Transaction_Type, MonthEnd(Date);
drop table INPUT;
MonthlyValue) as AggrMonthlyValue,
resident TMP order by Transaction_Type, Month asc;
drop table TMP;
MonthName(Date) AS Month,
Year(Date) AS Year,
Now in your chart select Month and Transaction type as dimensions and Sum(Amount) as Expression.
Hope this helps you.
Thanks ! It works very well...