I think you can do it using create chart tool (Chart Type : Pivot Table) by dragging attribute values columnwise.
You want the actual table to be look like this? if it's then we can use cross table for unique values but here we have dublicate values in attribute field, so we have to do it in multiple steps using qvd i guess.
If it wasn't for Field1, I would say that a simple Right rotation would do the trick. But Field1 makes things more complicated. So I would say that the best approach would be to create the pivot table in Excel (see attached) and then do a straight import into QlikView with the following syntax:
mytable: LOAD Field1, xx, yy, zz FROM test1.xls (biff, embedded labels, table is Sheet2$, filters( Remove(Row, Pos(Top, 1)), //This is the pivot table header row Remove(Row, Pos(Top, 4)) //This is the "Grand Total" row ));
I didn't do much cleanup on the pivot table, and instead just removed the first and last rows; maybe you can come up with a more elegant solution. But hopefully this will give you a good starting point.
I've expereinced the exact same data storage model and requried transformation with a WFM system and how it stored the attributes of each worker, i used a loop to build a flat table from the transactional entries.
First load all three fieldsyou specified above into a table called "datagroup" then use this script:
//import field list and count number of fields masterfields: LOAD distinct Attribute resident datagroup; //count no of distinct attributes let vfieldnos# = fieldvaluecount('Attribute'); //create pk list fields: load distinct Field1 resident datagroup; //set loop to zero let counter#=0; //loop through every attribute for counter#=0 to ($(vfieldnos#)-1) //createfield names let vfield = peek('Attribute',$(counter#),'masterfields'); //join data to pk list join(fields) load Field1, Value as [$(vfield)] resident datagroup where Attribute='$(vfield)'; next counter# //cleanup stage drop table masterfields; drop table datagroup;
I used the exact same script for 99 "Attributes" across 6000+ "field1"s from an xml repository and it took less than 30 seconds to build the flat table (the script will automatically count how many attributes and field1 values you have and adjust accordingly.