Discussion Board for collaboration on QlikView Scripting.
I have a table AAA like this :
ID Status timestamp
XX1 A 10/10/2015 04:00:15
XX1 B 11/10/2015 04:20:15
XX1 C 11/10/2015 22:00:15
XX2 A 14/11/2015 23:00:12
XX2 C 15/11/2015 23:07:18
And I would like a table BBB like this :
ID A B C
XX1 10/10/2015 04:00:15 11/10/2015 04:20:15 11/10/2015 22:00:15
XX2 14/11/2015 23:00:12 - 15/11/2015 23:07:18
How can I do it ? I have heard about the crosstable load function but I think it is more to do it on the other way ? (from the AAA table to the BBB table)
Any ideas ?
Have a good day
There is a check box in presentation tab , is "Horizontal", try to check in and verify if the result is what you expect.
let me know
LOAD [ID ],
[ Status ],
(ooxml, embedded labels, table is Sheet1);
If you need the table BBB; can try the following:
LOAD * INLINE [
ID, Status, tiempo
XX1, A, 10/10/2015 04:00:15
XX1, B, 11/10/2015 04:20:15
XX1, C, 11/10/2015 22:00:15
XX2, A, 14/11/2015 23:00:12
XX2, C, 15/11/2015 23:07:18
date#(tiempo) as Tiempo
DROP Table Test;
Resident Test2 Where Status = 'A';
Resident Test2 Where Status='B';
Resident Test2 Where Status='C';
Or if you need a chart whit this transpose you maybe try the following:
Dimensions: ID, Status
Have a good day!
LOAD DISTINCT ID
FOR Each vStatus IN 'A', 'B', 'C'
LEFT JOIN (Data)
timestamp as [$(vStatus)]
RESIDENT OriginalTable WHERE Status = '$(vStatus)';
DROP TABLE OriginalTable;
Generic load is required to get desired output,it transposes rows into columns.
Opposite to cross table.
See below links for generic load: