Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Fetching multiple fields using applymap

Hi all i have a requirement where i want to bring 3 fields using applymap

Table1

Id

1

2

3

Table2

Id   country region  age

1     i               a           26

2      b           c             11

How can i achieve it

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

You can either JOIN the tables

or

MAP:

MAPPING

LOAD Id, country &'|'& region &'|'& age as value

FROM Table2;

LOAD Id,

       Subfield( Applymap('MAP', Id), '|',1) as country,

       Subfield( Applymap('MAP', Id), '|',2) as region,

       Subfield( Applymap('MAP', Id), '|',3) as age,

     ...


View solution in original post

3 Replies
Highlighted
MVP
MVP

If I understand,

you can use a separator in the second field of fhe mapping table

MapTable:

Mapping load * inline [

f1, f2

1, i|a|26

2, b|c|11

];

X:

load

  f,

subfield(ApplyMap('MapTable', f,), '|', 1) as m1,

  subfield(ApplyMap('MapTable', f,), '|', 2) as m2,

  subfield(ApplyMap('MapTable', f,), '|', 3) as m3

inline [

f

1

2

];

Highlighted
MVP
MVP

You can either JOIN the tables

or

MAP:

MAPPING

LOAD Id, country &'|'& region &'|'& age as value

FROM Table2;

LOAD Id,

       Subfield( Applymap('MAP', Id), '|',1) as country,

       Subfield( Applymap('MAP', Id), '|',2) as region,

       Subfield( Applymap('MAP', Id), '|',3) as age,

     ...


View solution in original post

Highlighted
Not applicable

Thank you stefan it solved the problem

I have another roblem which is cracking my mind can you please help me please

Count in staright table for last six months