Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Could you help me with this problem.
Suppose I have a data:
Andrea
Andrea
Brian
Brian
Steve
and another data:
Andrea Sweden
Brian UK
I want to join both data, and the final result is:
Andrea Sweden
Andrea Sweden
Brian UK
Brian UK
Steve "Other"
My question is, how to add the "other" in the result in the load script?
By using ApplyMap():
MapTable:
Load * Inline
[Name,Country
Andrea,Sweden
Brian,UK];
RealData:
Load
ApplyMap('MapTable',Name,'Other') as Country,
...
Resident Data;
See also https://community.qlik.com/t5/Qlik-Design-Blog/Don-t-join-use-Applymap-instead/ba-p/1467592
Use mapping load and applymap
Map_Country:
Mapping Load * inline[
Name,Country
Andrea,Sweden
Brian,UK
];
Maintable:
Load *, ApplyMap('Map_Country',Name,'Other') as Country
From yourdatadource;
Refer below