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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Apply Map inside Apply Map

Hi,

is it possible to write a code like applymap('map1',applymap('map2',Field1)) ? (I tested it 5 time ago it seems working [:)])

if it is possible what is the maximum level of applymap inside applymap ?

Thanks.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Kerem,

It's possible and very useful indeed. You already tried it so you know. I have been using ten nested applymaps with some thousands of records and it went fine. I don't know, though, whether there is some limitation to the command.

Regards.

View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hello Kerem,

It's possible and very useful indeed. You already tried it so you know. I have been using ten nested applymaps with some thousands of records and it went fine. I don't know, though, whether there is some limitation to the command.

Regards.

Not applicable
Author

Thanks very much 🙂 I have 30 milyon records and four level applymaps.Thanks

Not applicable
Author

Hi friends,

can you make me an example?

I can't make it work

thanks

regards

marcohadiyanto
Partner - Specialist
Partner - Specialist

hi all,

can i see the example?

i want to try but can't do it

thanks

Miguel_Angel_Baeyens

Hello Marco,

Kind of dummy example though:

EmployeeToCodeMap:

MAPPING LOAD * INLINE [

EmpID, EmpCode

A, 1000

B, 2000

C, 3000

];

NameToIDMap:

MAPPING LOAD * INLINE [

EmpName, EmpID

John, A

Peter, B

Mike, C

];

TableWithEmployeeNames: // Here I want the code for the employee

LOAD Name,

     ApplyMap('NameToIDMap', Name, 'Without ID') AS ID, // This passes the employee name and returns the employee ID

     ApplyMap('EmployeeToCodeMap', ApplyMap('NameToIDMap', Name, 'Without ID'), 'Without Code') AS Code, // Need the first applymap to get the ID, then the second to get the code

     Address

FROM Emloyees.qvd (qvd); // Or whatever source

Hope that helps

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

Please take a look at this blog post for a discussion on the use of the ApplyMap statement:

http://bit.ly/kQcAZ5

Steve

ysj
Creator
Creator