Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I have an existing table in Qlik Sense (it was created as a several joins etc, not important), let's imagine it looks like this:
data_sample:
Load * Inline [
ColumnName, Value, ID
A, 14, 1
B, 15, 1
C, 16, 1
A, 21, 2
B, 12, 2
C, 17, 2
A, 71, 3
B, 81, 3
C, 41, 3
];
and I want to transponse the table to have sth like this:
ID | A | B | C |
1 | 14 | 15 | 16 |
2 | 21 | 12 | 17 |
3 | 7 | 81 | 41 |
I tried:
crosstable (columnName, value) Load * resident data_sample;
but with no luck...can you help me please?
You would use CROSSTABLE() if you had the second table and wanted to transform it to a straight table.
In your case you can either leave the data as it is and use the pivot table chart on the front end to present it the way you want or, in case you want to transform the data in the script, you might want to check this out: https://community.qlik.com/t5/Qlik-Design-Blog/The-Generic-Load/ba-p/1473470
You would use CROSSTABLE() if you had the second table and wanted to transform it to a straight table.
In your case you can either leave the data as it is and use the pivot table chart on the front end to present it the way you want or, in case you want to transform the data in the script, you might want to check this out: https://community.qlik.com/t5/Qlik-Design-Blog/The-Generic-Load/ba-p/1473470
Thank you very much! the generic load was the key 🙂