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: 
andreevaa
Contributor
Contributor

How to decode Value

Hello! How i can decode Last Name from field 'Reports to' if used 'EmpID'?

data.PNG

 

4 Replies
Ezirraffner
Creator II
Creator II

Hi @andreevaa,

Could you show an expected example?

Thanks

 

andreevaa
Contributor
Contributor
Author

For value 4 from 'Reports To'  I show for Last Name - Callins

Anil_Babu_Samineni

Question is not clear? What is the outcome

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Ezirraffner
Creator II
Creator II

Hi @andreevaa,

You can try using Mapping. See below...

 

Table:
load * inline [
EmpID, LastName, ReportsTo,
24,Crawford,19
1,Roll,4,
2,Presley,,
3,Carsson,4,
9,Brolin,4,
42,Arlig,3,
52,Ashkenaz,42,
7,Lindwall,4,
8,Shine,2,
19,Lawson,8,
23,Sandu,19,
43,Park,7,
44,Kent,7,
4,Callins,2
];

MapLastName:
Mapping Load
EmpID,
LastName
Resident Table;

Decode:
Load
EmpID,LastName,ReportsTo,
ApplyMap('MapLastName',ReportsTo,Null()) as ReportsToLastName
Resident Table;
Drop table Table;

 

Regards,

Ezir