Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Friends,
I have two tables.
When I select 'class1' field from Table1, the duration values of a, d and x should be selected via 'comp' field from Table2.
When I select 'class2' field from Table1, the duration values of b, e and y should be selected via 'comp' field from Table2.
The same things for other fields...
How can I join these tables ?
Thanks for kind reply in advance.
Regards.
Table1 | Table2 | ||||||
class | comp1 | comp2 | comp3 | student | comp | duration | |
class1 | a | d | x | student1 | a | 40 | |
class2 | b | e | y | student2 | b | 50 | |
class3 | c | f | student3 | c | 30 | ||
class4 | g | student4 | d | 60 | |||
e | 56 | ||||||
f | 55 | ||||||
g | 59 | ||||||
x | 63 | ||||||
y | 67 | ||||||
z | 35 | ||||||
s | 71 | ||||||
m | 75 | ||||||
n | 79 | ||||||
v | 83 | ||||||
t | 49 |
You would want to use the CROSSTABLE function: https://help.qlik.com/en-US/sense/April2018/Subsystems/Hub/Content/LoadData/work-with-cross-tables.h...
Your script should look something like this:
Table1:
CrossTable(Comp#, Comp,2)
Load Class, Student
From filename.xls;
Table2:
Load Comp, Duration
From filename2.xls;
Thanks for your help Serina.
Regards