Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have column like these
Gender
1
0
1
1
0;
I want output 1 with Male, 0 with Female.
Gender
Male
Female
Male
Male
Female;
Use expression in the list box like:
=If(Gender=1, 'Male', 'Female')
For script:
Load
If(Gender=1, 'Male', 'Female') as Gender
from <>
Hello,
if you want to replace IDs by descriptions in load script it is good to use applymap() function. Yo can define the map in the beginning of your script and then use it whetever you want.
In this case the map will be:
[M_gender]:
mapping load * inline [
gender_ID,gender_text
0,Female
1,Male
];
And the function during the resident load will be like:
applymap('M_gender',gender) as gender_text
You can find more about applymap here Data Cleansing or on qlik help https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/MappingFunctions/ApplyMa....
Hope it will help ,
Maria