Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Qlik Default Join

I am joining two tables.Lets say for example(Table A, Table B)

Table A:

A,B

Table B:

A,C

The result from the above is not matching when I put outer join between these two

Table A:

A,B

outer join(Table A)

Table B:

A,C

 

Ideally both should be same right?

7 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Qlik Default Join

It's quite possible you would get different results by joining in script vs leaving as two seperate tables.  In the case of there being duplicate values for A, you would generate additional values for C.  For example:

TableA:
A, B
A1, B1
A1, B2
A2, B3

TableB:
A, C
A1, 100
A2, 200

sum(C) = 300

outer Join(TableA) from TableB and the result would be:

TableA:
A, B, C
A1, B1, 100
A1, B2, 100
A2, B3, 200

sum(C) = 400

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

Highlighted
Contributor III
Contributor III

Re: Qlik Default Join

Thanks for the clarification.How can I eliminate duplicate in that case?using not exists?

Highlighted
MVP & Luminary
MVP & Luminary

Re: Qlik Default Join

Leave them as separate tables if you don't want the duplication. 

Highlighted
Contributor III
Contributor III

Re: Qlik Default Join

##- But I have to build one resident table using that join table
Please type your reply above this line -##
Highlighted
MVP & Luminary
MVP & Luminary

Re: Qlik Default Join

We are kind of going in circles here. Why do you need to have one table?

Highlighted
Contributor III
Contributor III

Re: Qlik Default Join

I need to build a column using column from two tables..In my case,for ex -
if(B=1 &C=3,set flag)
Highlighted
MVP & Luminary
MVP & Luminary

Re: Qlik Default Join

In that case I would recommend using ApplyMap. See https://qlikviewcookbook.com/2020/03/creating-temporary-script-associations/

-Rob