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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

Qlikview default join (Associate) Vs Join between tables

Hi All,

I have 2 tables.I want to merge it into one via join.

Case1:-

table a:

ref,

amount,                               

----

from table a;

table b:

ref,

Tax,

----

from table b;

Qlikview by default creating the join via ref and showing right data.

--------------------------------------------------------------------------------------------------------

Now i want to merge both table into 1 via join ref.

Case2:-

table a:

ref,

amount,

----

from table a;

join

table b:

ref,

Tax,

----

from table b;

But it is showing wrong data.What should i do to show right result during merging into 1 table.

table b having multiple entries of ref.But table 1 having single entry of ref.

Please suggest me to sort out this.

Thanks,

13 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

The join will not work if the join key has duplicate values, as this will result in the creation of extra row and either the tax or the amount (or both) will be duplicated.

Why do you need to make one table? The model calculations will work just as well if the tables are loaded as is.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable

say you are having two following tables like:

tablea:

mapping

load

ref,

amount

from tablea;

tableb:

load

ref,

applymap('tablea',ref,null()) as amount,

tax

from tableb;

This will give you one final table.

Note: Mapping load works only when you are fetching single field from other table.

maxgro
MVP
MVP

I still suggest don't join but, if you want to join, group the tax table

tablea:

load * inline [

ref, amount

1, 1

2, 2

3, 3

];

tableb:

load * inline [

ref, tax

1,1

1,11

2,2

2,22

3,33

];

join (tablea)

load ref, sum(tax) as tax

Resident tableb

group by ref;

DROP Table tableb;

1.png

himanshi
Contributor III
Contributor III

hiii,

  you can use concatenate or resident load can also be used.

regards.