Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear ladies and gentleman,
I've been struggeling for days with the question following:
My table I'm loading in looks like:
Type // Value // Year
A // 1.5 // 2010
B // 2 // 2010
C // 1.7 // 2010
B // 1.1 // 2009
During my LOAD, I would like to SUM all Types A and B by each YEAR and store them as a new
value TYPE D for each year.
I haven't found a solution wheather in the QV Manual nore in the Community.
Hi,
So far I have not seen a direct way to do this but you can have a workaround :-
Fact_Temp:
Load
Type,
Value,
Year
From FactFile.qvd;
Fact:
Noconcatenate Load
Year,
sum(Value) as Value,
'D' as Type
Resident Fact_Temp where Match(Type,'A','B')
Group by Year;
concatenate (Fact)
Load
Type,
Value,
Year
Resident Fact_Temp where not Match(Type,'A','B');
Drop Table Fact_Temp;
I hope this will help you.
Thanks & Best Regards
Kuldeep Tak
Thank you very much. I'll give it a try. And verify your answer when it's working.