Discussion board where members can get started with QlikView.
I have a dataset as attached in the excel and i want to know how to do a cross table to get the data in the desired format.
I tried different options in the edit script but not able to get the second rows as columns.
Any help on this please.
Cross Table Load
The syntax is:
crosstable (attribute field name, data field name [ , n ] ) ( loadstatement | selectstatement )
attribute field name is the field to contain the attribute values.
data field name is the field to contain the data values.
n is the number of qualifier fields preceding the table to be transformed to generic form. Default is 1.
Try like this
CrossTable(Subject_New, Value, 3)
LOAD If(Len(Trim(F1)) = 0, Previous(F1), F1) AS Region,
//If(Len(Trim(Subject)) = 0, Previous(Subject), Subject) AS Measure,
(ooxml, embedded labels, table is [Data Source], filters(
Subject_New AS Subject,
Value AS Count
WHERE Subject= 'Count';
Value AS Avg
WHERE Subject= 'Avg';
DROP TABLE Temp;
Check this thread , this will help you to achieve your requirement
One more solution using multi_header_pivot_import.qvw
You just need to change below mentioned statements only. That's it