Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeff2022
Contributor II
Contributor II

How to make cross table for transpose column

Dears

I had met a question from transpose table1 to table in Qliksense script .

 

table1,

CustomerNo Period out_of_warranty out_of_mc
A 2022-01 1 1
B 2022-01 1 2
C 2022-01 2 2
D 2022-01 1 1
A 2022-01 1 1
B 2022-01 1 1
C 2022-01 1 1
D 2022-01 1 0

 

Table2:

CustomerNo Period Catergory Value
A 2022-01-01 out_of_warranty 10
B 2022-01-03 out_of_mc 20
C 2022-01-03 out_of_warranty 10
D 2022-01-07 out_of_mc 20
A 2022-01-08 out_of_warranty 10
B 2022-01-03 out_of_mc 20
C 2022-01-08 out_of_warranty 10
D 2022-01-03 out_of_mc 20

 

who can help? Thank you so much.

Labels (1)
2 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @Jeff2022 ,

Please try the below script.

main:
CrossTable(category,value,2)
LOAD
CustomerNo,
Period,
out_of_warranty,
out_of_mc
FROM [lib://test/Testing.xlsx]
(ooxml, embedded labels, table is Sheet6);

NoConcatenate

load
CustomerNo,
Period,
category,
sum(value)as value
Resident main
group By
CustomerNo,
Period,
category;

drop table main;

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!