Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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?

Tags (2)
1 Solution

Accepted Solutions
sushil353
Honored Contributor II

Re: Miss left join duplicated rows

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

5 Replies
sushil353
Honored Contributor II

Re: Miss left join duplicated rows

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
Valued Contributor

Re: Miss left join duplicated rows

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
Valued Contributor II

Re: Miss left join duplicated rows

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.

MVP
MVP

Re: Miss left join duplicated rows

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

Re: Miss left join duplicated rows

thank you