Discussion Board for collaboration related to QlikView App Development.
Data in the .csv file is not structured properly and it appears like this:
Column1 Column2 Column3 Column4 Column5 Column6
A 1 C 3 E 5
B 2 D 4 F 6
While loading the data, I want to transform both row and column data simultaneously and appear as below:
A B C D E F
1 2 3 4 5 6
Can you please suggest an appropriate way to achieve this transformation of data.
what you need is to unwrap it first and then transpose.
Try this code, it shoul do what you need. You just need to name the fields correctly at the end and you should be all set.
(txt, codepage is 1252, no labels, delimiter is ';', msq, filters(
Remove(Row, Pos(Top, 1)),
Unwrap(Col, Pos(Top, 5)),
Unwrap(Col, Pos(Top, 3)),
Hope it helps.
View solution in original post
I guess you're trying to effectively un-pivot the data?
Try using the transpose function. This will rotate the data using the chosen column as the field name and turn other columns into the values.
F1 and search transpose.
Thank you, it is really helpful.
Just to add to discussion: I noticed that while loading data if you get into "Enable Transformational Step".
It gives you visual interface to modify/transform the actual data without the need for you to code and remember the syntax.
From there you can unwrap and transform data. In addition, you can add/delete rows and columns.