Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
simotrab
Creator III
Creator III

Transform a pivot in a table

Hi community,

I have a problem of data management, and I hope to have put a clear title.

I have this kind of data: some seller, some products, and the quantity of product sold in two months.

seller  product  jan feb

a         aa         1     2

a         ab         2     3

b         ba         3     1

b         bb         3     8

here in a way Qlik-edible waty;

load*inline

[ seller, product, jan, feb

a,aa,1,2

a,ab,2,3

b,ba,3,1,

b,bb,3,8

];

I'd like to have the data in this way, using the load script:

seller  product  month quantity

a         aa          jan       1

a         aa          feb       2

a         ab         jan        2

a         ab         feb        3

b         ba         jan        3

b         bb         feb        1

b         ba         jan        3

b         bb         feb        8

how can I reach this?

Thanks for your time

1 Solution

Accepted Solutions
OmarBenSalem
Partner - Champion II
Partner - Champion II

transform it as follow

Crosstable (Month, Quantity, 2)  load * inline

[ seller, product, jan, feb

a,aa,1,2

a,ab,2,3

b,ba,3,1,

b,bb,3,8

];

View solution in original post

3 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

transform it as follow

Crosstable (Month, Quantity, 2)  load * inline

[ seller, product, jan, feb

a,aa,1,2

a,ab,2,3

b,ba,3,1,

b,bb,3,8

];

OmarBenSalem
Partner - Champion II
Partner - Champion II

result :

Capture.PNG

techvarun
Specialist II
Specialist II

Use Cross Table

Crosstable (Month, Sales, 2) load*inline

[ seller, product, jan, feb

a,aa,1,2

a,ab,2,3

b,ba,3,1,

b,bb,3,8

];