Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

Table transpose

Hi everyone!
I have a table like this one.

Period_KeyCost ACost BCost C
2020-06-0161574152100
2020-07-011695483915000
2020-08-012083098711724
2020-09-016757120

 

And in load script I need to convert it to the table like this

Period_Key2020-06-012020-07-012020-08-012020-09-01
Cost A615716954208306757
Cost B41583998712
Cost C210015000117240

 

I am trying to use cross table but can't get proper result. 

Can any one help me to solve this task?

Labels (1)
1 Solution

Accepted Solutions
MVP
MVP

@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; 

 

Annotation 2020-09-09 222140.png

View solution in original post

4 Replies

Creator II
Creator II

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.  

MVP
MVP

@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; 

 

Annotation 2020-09-09 222140.png

View solution in original post

Creator II
Creator II

@Kush thank you much!