Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksingh
Creator III
Creator III

Need help in reversing apply map

Hi Expert,

I know how apply map work. But I want to reverse it.

Branch_map:

Mapping

Load

NAME&’|’&DEPARTMENT,

BRANCH

from branch;


Table1:

Load

NAME,

DEPARTMENT,

BRANCH,

level,

.

.

.

applymap(‘Branch_map’, NAME&’|’&DEPARTMENT, null()) as NEW_BRANCH

FROM table1;

the above apply map checks mspping table with table and brings BRANCH from mapping table. But my requirement is reverse.

I mean, for the matched records, it should store BRANCH records from table.

1 Reply
prieper
Master II
Master II

give it a try with

....

IF (LEN(applymap(‘Branch_map’, NAME&’|’&DEPARTMENT, null())), BRANCH, applymap(‘Branch_map’, NAME&’|’&DEPARTMENT, null()))     AS NEW_BRANCH

Peter