Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
user-azadi
Contributor III
Contributor III

Link many fields to one field

Hi, Qliks

i have two table same below:

Base Table:

IDDescription
1Des1
2Des2
3Des3
4Des4
5Des5

Entry Table:

Entry 1Entry 2Entry 3
351
242

all of values in Entry Table , define in ID field in Base Table .

i want find Description of value of Entry Table in Base Table.

how can i do?

6 Replies
ogster1974
Master II
Master II

Pivot your entry data on load so it looks like.

Entry
ID
13
12
25
24
31
32

Then the ID will associate automatically with your base table.

Regards

Andy

its_anandrjs

Use ApplyMap() here.

user-azadi
Contributor III
Contributor III
Author

Dear Anand , Can you explain how and write script?

its_anandrjs

If this is required that you have to load three columns of the Entry value then use.

Base_Map_Table:

Mapping LOAD * Inline [

ID, Description

1, Des1

2, Des2

3, Des3

4, Des4

5, Des5  ];

Base_Table:

LOAD * Inline

[

ID, Description

1, Des1

2, Des2

3, Des3

4, Des4

5, Des5

];



Entry_Table:

LOAD *,

ApplyMap('Base_Map_Table',[Entry 1],Null()) as Desc1,

ApplyMap('Base_Map_Table',[Entry 2],Null()) as Desc2,

ApplyMap('Base_Map_Table',[Entry 3],Null()) as Desc3;

LOAD * Inline [

Entry 1, Entry 2, Entry 3

3, 5, 1

2, 4, 2  ];



user-azadi
Contributor III
Contributor III
Author

The output I expect is:

Entry1

Description1

Entry2

Description2

Entry3

Description3

3

Des3

5

Des5

1

Des1

2

Des2

4

Des4

2

Des2

its_anandrjs

Code is same just rename the field names.

Base_Map_Table:

Mapping LOAD * Inline [

ID, Description

1, Des1

2, Des2

3, Des3

4, Des4

5, Des5  ];

Base_Table:

LOAD * Inline

[

ID, Description

1, Des1

2, Des2

3, Des3

4, Des4

5, Des5

];



Entry_Table:

LOAD *,

ApplyMap('Base_Map_Table',[Entry 1],Null()) as Description1,

ApplyMap('Base_Map_Table',[Entry 2],Null()) as Description2,

ApplyMap('Base_Map_Table',[Entry 3],Null()) as Description3;

LOAD * Inline [

Entry 1, Entry 2, Entry 3

3, 5, 1

2, 4, 2  ];