Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I´ve got a field [SEX] with the data F or M (female or male).
I want to change the F to a W.
Is this or something like this the way
LOAD [SEX],
IF [SEX]=F then W as SEXa;
Or maybe someone have a better solution??
Hi Kabilan,
Below is the example
a:
Mapping
LOAD * INLINE [
Current, Changed
F,W
];
b:
LOAD * INLINE [
Sex, Name
M, Kim
F, Ruchi
M, David
F, Kathe
];
c:
NoConcatenate
LOAD Name, ApplyMap('a',Sex) as Se
Resident b;
drop Table b;
LOAD [SEX],
IF ([SEX]= 'F','W') as SEXa;
trie with this.
Hi
try like this
load *,if(sex='f','w',sex) as sex from tablename;
hope it helps
Hi,
You can use the Mapping and Applymap() Concept.
Please refer these two from Qlikview help menu.
Regards,
Kabilan K.
Hi Kabilan
Could you please make an example
Regards
Hi,
LOAD [SEX]
IF([SEX]='F',[SEX]) as SEXa;
Regards,
Prasath
LOAD [SEX],
IF [SEX]=F then W as SEXa;
should be
LOAD [SEX],
IF ([SEX]='F','W') as SEXa;
The field SEXa will have the value W when it was F. It will have a NULL value when it is NOT W... (meaning there is no else defined in the if clause)
Please check the if/else syntax; it is pretty basic ;--)
Hi..
U can use below script....
MapTable:
Load * Inline
[Text, AltText
F,W];
LOAD [SEX],
Applymap('MapTable',[SEX]) as SEXa;
Hope this helps u.
Regards,
Kabilan K.
Hi Kabilan,
Below is the example
a:
Mapping
LOAD * INLINE [
Current, Changed
F,W
];
b:
LOAD * INLINE [
Sex, Name
M, Kim
F, Ruchi
M, David
F, Kathe
];
c:
NoConcatenate
LOAD Name, ApplyMap('a',Sex) as Se
Resident b;
drop Table b;