Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to join this table?

Hi all im totally new in QV.

Well i have 2 table. I need to join them.
tables are


table1:
load * inline [
country, express
AT, 2
DK, 2
GB, 3
GR, 4
....
];
table2:
load * inline [
weight, zone1, zone2, zone3
0.5, 6, 8, 10
1, 7, 9, 11
1.5, 8, 10, 12
2, 10, 12, 14
.....
];


table1 contains country and their zone codes.
table 2 contains costs of zones and weights.

I need to match zones and join them. How to do this? Need some help please.

1 Solution

Accepted Solutions
Not applicable
Author

Try using the inline wizard and selecting cross table, that should change the structure from

weight, zone1, zone2, zone3
0.5, 6, 8, 10
to

weight, zone, cost

0.5, zone1, 6

0.5, zone2, 8

0.5, zone3, 10

Also you need to change the name "express" in table1 to "zone" and make sure the text matches the zone descriptions in table2, so that the 2 tables match.

eg

table1a:load

country,

'zone'&express as zone

resident table1

Then drop table1.

View solution in original post

12 Replies
Not applicable
Author

Hi Muncho,


table1:
load * inline [
country, express
AT, 2
DK, 2
GB, 3
GR, 4
....
];

//table2:
join load * inline [
weight, zone1, zone2, zone3
0.5, 6, 8, 10
1, 7, 9, 11
1.5, 8, 10, 12
2, 10, 12, 14
.....
];

simply use join between the tables. if u want left join r right join just mention it. in qlikview join are very easy.
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

I can not see, what is you key to join the tables?

Normally it goes like this:

Table1:
Load key, field1, field2, ... from table1;

Left Join (Table1)
Load key, field3, field4,... from table2;

Not applicable
Author

Hi Srividhya

In express field there is zone codes inside.
In zone1, zone2, zone3 fields of table2 are cost.
So i think just joining them is cannot solve this.

Regards

Not applicable
Author

Hi Martina.

I know i need key fields to join them. That's why i posted.
Need some help to make key.

Not applicable
Author

Hi Muncho,

I need to match zones and join them. means...... realy am nt getting u.... plz exp clr wat's ur need

Not applicable
Author

PFA .... Is this wat u want.. may right

Not applicable
Author

Well i use example to describe it to you.

If i select GB their zone code is 3 in table1.
so i need to show just weight and cost of zone3 in table2. I think i need to change something in table2. But how? that's what im asking.
these 2 tables from excel file. This excel file may change sometimes so i dont want to change or edit in excel file.

Do you got me now?

Not applicable
Author

Try using the inline wizard and selecting cross table, that should change the structure from

weight, zone1, zone2, zone3
0.5, 6, 8, 10
to

weight, zone, cost

0.5, zone1, 6

0.5, zone2, 8

0.5, zone3, 10

Also you need to change the name "express" in table1 to "zone" and make sure the text matches the zone descriptions in table2, so that the 2 tables match.

eg

table1a:load

country,

'zone'&express as zone

resident table1

Then drop table1.

Not applicable
Author

hello rick

QV is totally new to me. And i got something on your post. But i have no idea how to use that crosstable. Can you give me some example.