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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
govindvasu
Contributor III
Contributor III

Crosstable from vertical to horizontal

Hi I have table data as below

govindvasu_0-1691159215988.png

 want to convert as below 

govindvasu_1-1691159243632.png

This question is quite opposite to https://community.qlik.com/t5/QlikView-App-Dev/Crosstable/td-p/488719

Thanks in advance

 

Labels (3)
1 Solution
4 Replies
govindvasu
Contributor III
Contributor III
Author

I tried this. This results to multiple tables.

govindvasu_0-1691173874274.png


How can I access all these variables from all these tables at a time in data load editor for writing the conditions on these individual variables?

cristianj23a
Partner - Creator III
Partner - Creator III

Hello, here is a cross table code:

CrossTable(Social, Value)
LOAD * INLINE [
ID,Social,Value
123,Facebook,true
123,Linkedin,false
456,Facebook,false
456,Linkedin,false
];

Here is some code to join the tables:

Width:
LOAD * INLINE [
Key1, Key2, Key3, Width
1, A, X, 10
2, B, Y, 20
3, C, Z, 30
];

Diameter:
LOAD * INLINE [
Key1, Key2, Key3, Diameter
1, A, X, 5
2, B, Y, 10
3, C, Z, 15
];

Height:
LOAD * INLINE [
Key1, Key2, Key3, Height
1, A, X, 2
2, B, Y, 4
3, C, Z, 6
];

Length:
LOAD * INLINE [
Key1, Key2, Key3, Length
1, A, X, 3
2, B, Y, 6
3, C, Z, 9
];

Weight:
LOAD * INLINE [
Key1, Key2, Key3, Weight
1, A, X, 8
2, B, Y, 16
3, C, Z, 24
];

Color:
LOAD * INLINE [
Key1, Key2, Key3, Color
1, A, X, Red
2, B, Y, Green
3, C, Z, Blue
];

NoConcatenate
Result:
LOAD * RESIDENT Width;

LEFT JOIN (Result)
LOAD * RESIDENT Diameter;

LEFT JOIN (Result)
LOAD * RESIDENT Height;

LEFT JOIN (Result)
LOAD * RESIDENT Length;

LEFT JOIN (Result)
LOAD * RESIDENT Weight;

LEFT JOIN (Result)
LOAD * RESIDENT Color;

DROP Tables Width, Diameter, Height, Length, Weight, Color;

 

Regarts.

 

 

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
marcus_sommer

Just read the posting again. In the end is a generic example to join everything together.