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: 
govind1501
Contributor III
Contributor III

Replace the number values using the mapping table.

Hi All,

I have the tables like below and required replace values in EMPVALUE using POSTDESC and  please find expected output below.

EMPIDEMPVALUE
101A001002
102A002003
103A003001

 

POSTIDPOSTDESC
001High
002Low
003Med

 

Expected Output:

EMPIDEMPVALUE
101AHighLow
102ALowMed
103AMedHigh
Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Hi,

One Solution:

Map1:
Mapping LOAD * INLINE [
    POSTID, POSTDESC
    001, High
    002, Low
    003, Med
];


Data:
LOAD *,MapSubString('Map1', EMPVALUE) as New_EMPVALUE  INLINE [
    EMPID, EMPVALUE
    101A, 001002
    102A, 002003
    103A, 003001
];

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

Hi,

One Solution:

Map1:
Mapping LOAD * INLINE [
    POSTID, POSTDESC
    001, High
    002, Low
    003, Med
];


Data:
LOAD *,MapSubString('Map1', EMPVALUE) as New_EMPVALUE  INLINE [
    EMPID, EMPVALUE
    101A, 001002
    102A, 002003
    103A, 003001
];

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
govind1501
Contributor III
Contributor III
Author

Working perfect Toufiq. Accept as your solution. thank you.