Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I have a table like this one.
Period_Key | Cost A | Cost B | Cost C |
2020-06-01 | 6157 | 415 | 2100 |
2020-07-01 | 16954 | 839 | 15000 |
2020-08-01 | 20830 | 987 | 11724 |
2020-09-01 | 6757 | 12 | 0 |
And in load script I need to convert it to the table like this
Period_Key | 2020-06-01 | 2020-07-01 | 2020-08-01 | 2020-09-01 |
Cost A | 6157 | 16954 | 20830 | 6757 |
Cost B | 415 | 839 | 987 | 12 |
Cost C | 2100 | 15000 | 11724 | 0 |
I am trying to use cross table but can't get proper result.
Can any one help me to solve this task?
@Peony try below
Crosstab:
CrossTable([Product Key],Value)
LOAD Period_Key,
[Cost A],
[Cost B],
[Cost C]
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/Table-transpose/td-p/1742510]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);
Final:
Generic load [Product Key],
Period_Key,
Value
Resident Crosstab;
DROP Table Crosstab;
Check this QlikView - Rotating Tables
Thank you Sunny foe your suggestion. Unfortunately I can't use this function because to create second table in load script I will use Resident load and Transpose() doesn't work with it.
@Peony try below
Crosstab:
CrossTable([Product Key],Value)
LOAD Period_Key,
[Cost A],
[Cost B],
[Cost C]
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/Table-transpose/td-p/1742510]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);
Final:
Generic load [Product Key],
Period_Key,
Value
Resident Crosstab;
DROP Table Crosstab;
@Kushal_Chawda thank you much!