Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Miss left join duplicated rows

Hi Friends,

I am in a trouble in left join function.

my two sources and code as below pictures:

Capture1.JPGCapture2.JPGCapture3.JPG

what Result I want to get is :

Capture4.JPG

however, actual situation is only first row:

Capture5.JPG

but when my sources change to:

Capture1.JPGCapture6.JPGeverything goes well:

Capture7.JPG

but in actual situation, I don't have AB2 in second table, what I can do to get the result I need?

1 Solution

Accepted Solutions
sushil353
Master II
Master II

Hi,

Instead of left join why don't you use applymap ..

in your scenario you can write something like this

mapping load

list:

Name,Sex from xyz;

table:

load

Name

applymap('list',Name) as sex,

Category,

Date,

Amount

from aksdj;

HTH

Sushil

View solution in original post

5 Replies
sushil353
Master II
Master II

Hi,

Instead of left join why don't you use applymap ..

in your scenario you can write something like this

mapping load

list:

Name,Sex from xyz;

table:

load

Name

applymap('list',Name) as sex,

Category,

Date,

Amount

from aksdj;

HTH

Sushil

agomes1971
Specialist II
Specialist II

Hi,

test with this code

List:

LOAD * INLINE [

    Name, Category, Date, Amount

    AB1, A, 29/08/2016, 10

    AB1, A, 30/08/2016, 11

    AB1, A, 31/08/2016, 12

    AB1, A, 01/09/2016, 13

    AB1, A, 02/09/2016, 14

    AB1, A, 03/09/2016, 15

    AB1, A, 04/09/2016, 16

];

Left Join(List)

LOAD * INLINE [

    Name, Sex

    AB1, F

    Ab2, F

];

HTH

André Gomes

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

I would use Applymap.

Like:

map_gender:

mapping load Name

     ,Sex

From Source;

List:

Load Name

     ,Category

     ,Date

     ,Amount

     ,Applymap('map_gender', Name, ':') as Sex

From Source

Give it a try - simple and efficient.

sunny_talwar

Can you try this:

List:

LOAD Name,

          Category,

          Date,

          Amount

FROM ...

Left Join (List)

LOAD Name,

          Sex

FROM ...

or

List:

LOAD Name,

          Category,

          Date,

          Amount

FROM ...

Right Join (List)

LOAD Name,

          Sex

FROM ...

Not applicable
Author

thank you