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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Joining or Mapping in Qlikview

Hi all,

I have received requirement below:

Table A:

IdName
1A
2B
3C
4D
5E

Table B:

Idvalue
110
320
511

Table C

Namevalue
B13
D23

Target Table:

IdNameHeader 3
1A10
2B13
3C20
4D23
5E11

How to combine Table A,B,C to Target Table?

Best Regards.

Louis

1 Solution

Accepted Solutions
Kushal_Chawda

Map1:

mapping LOAD Id,

     value

FROM

[https://community.qlik.com/thread/268497]

(html, codepage is 1252, embedded labels, table is @2);

Map2:

mapping LOAD Name,

     value

FROM

[https://community.qlik.com/thread/268497]

(html, codepage is 1252, embedded labels, table is @3);

Data:

LOAD Id,

     Name,

     alt(ApplyMap('Map2',Name,Null()),ApplyMap('Map1',Id,Null())) as Value

    FROM

[https://community.qlik.com/thread/268497]

(html, codepage is 1252, embedded labels, table is @1);

Capture.JPG

View solution in original post

2 Replies
Kushal_Chawda

Map1:

mapping LOAD Id,

     value

FROM

[https://community.qlik.com/thread/268497]

(html, codepage is 1252, embedded labels, table is @2);

Map2:

mapping LOAD Name,

     value

FROM

[https://community.qlik.com/thread/268497]

(html, codepage is 1252, embedded labels, table is @3);

Data:

LOAD Id,

     Name,

     alt(ApplyMap('Map2',Name,Null()),ApplyMap('Map1',Id,Null())) as Value

    FROM

[https://community.qlik.com/thread/268497]

(html, codepage is 1252, embedded labels, table is @1);

Capture.JPG

sonkumamon
Creator
Creator

Try:

map_TableB:

MAPPING

LOAD

     id,

     value

FROM [Table B]

map_TableC:

MAPPING

LOAD

     Name,

     value

FROM [Table C]

TargetTable:

LOAD

     id,

     name

     APPLYMAP('map_TableB', id, APLLYMAP('map_TableC', Name)) AS Header3

FROM [TABLE A]

You define the Table C map as the default mapping in case Table B doesn't have matching values.

Uri