Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

f_zoltan
New Contributor

Add column and it's values from Table.2 to Table.1 via same ID fields

Can you help me? I would like  to add  column and  its values from Table.2 to Table.1 via same ID fields, like in this example:

Table.1

xxx.IDTable.1 measure.type.1Table.1 measure.type.2Table.1 measure.type.3
A116504450
A117495500
A118379460

Table.2

xxx.IDTable.2 col.1Table.2 col.2
A116NQ
A117AW
A118BE

Desired Table:

xxx.IDTable.1 measure.1Table.1 measure.2Table.1 measure.3Table.2 col.1Table.2 col.2
1504450NQ
2495500AW
3379460BE

We are talikng about two different table , but with same ID's.

I also would like to do a crosstable on Table.1 which is working for me, but I need the second table col1. and other values as well.

If I do crosstable on table.1 the xxx.ID will appear as many as attribute masure exist. (example: ID: A116 has three different masure types in this case: 50; 4; 450 )

I would like to filter the mesured types, and its values via filtering, -  which is also work  for me - , if i do a crosstable with auxiliary table of attributes.

The problem is I will not know the second table  col.1 and col.2 result/status.

Thank you , if you can help me!

Best Regards,

Zoltán

1 Reply
undergrinder
Valued Contributor II

Re: Add  column and it's values from Table.2 to Table.1 via same ID fields

Hi Zoltán!

If you are sure, that every ID in the tables are unique, you can use left join in load script (We are talking about load script right?)

table1:

Load

     Id,

     columns....

from/resident [table1];

left join(table1)

Load

     Id,

     columns....

from/resident [table2];

That performs a simple leftjoin on the table 1.

Hope this helps.

G.