Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join not working corectly

I have trouble joining two different tables. Have searched through community for answers with no results. I do believe that i am missing something.

If i am trying to join some data just inline in script it works perfectly:

TEST:

Load * Inline [ 

ID,NAME1,SURNAME1,REGION,COUNTRY,NUMBER,T1

1,a,aa,EU,UK,323,T1

2,b,bb,EU,UK,454,T1

1,a,aa,EU,UK,323,T1

2,b,bb,EU,UK,454,T1

];

Join(TEST)

LOAD * Inline [

ID,NAME2,SURNAME2,REGION,COUNTRY,NUMBER,T2

1,a,aa,EU,UK,323,T2

2,b,bb,EU,UK,454,T2

1,a,aa,EU,UK,323,T2

2,b,bb,EU,UK,454,T2

];

And i am getting result which i do want to get:

IDNAME1SURNAME1NAME2SURNAME2REGIONCOUNTRYNUMBERT1 T2
1aaaaaaEUUK323T1T2
2bbbbbbEUUK454T1T2

I do want to create a table with unique combinations from those 2 tables and it works perfectly with Inline.

However, i am loading data from xlsx and the result is not what i have expected

IDNAME1SURNAME1NAME2SURNAME2REGIONCOUNTRYNUMBERT1T2
1aaaEUUK323T1
1aaaEUUK232T2
2bbbEUUK454T1
2bbbEUUKJ454T2

Here is a simple script that i have:

TABLE:

LOAD

     ID, //can repeat

     NAME1,

     SURNAME1,

     REGION,

     COUNTRY,

     NUMBER,

       'T1' as T1 //field for checking if joined correctly

FROM xlsx file

Join(TABLE)

LOAD

     ID, //can repeat

     NAME2,

     SURNAME2,

     REGION,

     COUNTRY,

     NUMBER,

       'T2' as T2 //field for checking if joined correctly

FROM other xlsx file

There is no unique IDs in both tables from xlsx.

There are some lines that matches in both xlsx's.

I ma just trying to find some hidden hint which i have missed.

Help is very appreciated.

12 Replies
Not applicable
Author

With my skills in Qlikview, QUALIFY does not help solve the issue.

I would really appreciate if somebody can help with this.

I have an idea that Join is not working if there is several lines that are matching.

Colin-Albert

Consider using ApplyMap rather than joining the data. Mapping will avoid the risk of duplicating the measures in your data.

See this post for more details Don't join - use Applymap instead

sasiparupudi1
Master III
Master III

what is the expected output for the above problematic data?