Discussion Board for collaboration related to QlikView App Development.
I have 3 columns as Below
A B C
1 2 4
2 1 3
3 5 1
I want to create 2 columns from the above 3 columns like below.
NewColumn Value
A 6
B 8
C 8
How can I acheive this ?
May be like this:
Table:
LOAD * Inline [
A, B, C
1, 2, 4
2, 1, 3
3, 5, 1
];
FinalTable:
LOAD Sum(A) as Value,
'A' as NewColumn
Resident Table;
Concatenate(FinalTable)
LOAD Sum(B) as Value,
'B' as NewColumn
Resident Table;
Concatenate(FinalTable)
LOAD Sum(C) as Value,
'C' as NewColumn
Resident Table;
DROP Table Table;
One more solution may be
T1:
LOAD '' as dummy,*;
LOAD * INLINE [
A, B, C
1, 2, 4
2, 1, 3
3, 5, 1
];
T2:
CrossTable(Field, Data)
LOAD dummy,
A,
B,
C
Resident T1;
DROP Table T1;
DROP Field dummy;
NoConcatenate
Final:
LOAD Field,sum(Data) as Data Resident T2 Group by Field;
DROP Table T2;
I like this more than my solution. Thanks for sharing this Settu
Thanks sunindia