Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am new to Qlikview and have been trying to incorporate a condition in my load script for a field as given below:
if(purgechar(Field,'-')='','N',Field) as Field
FROM ABC.qvd (qvd)
I need the script to display 'N' wherein the field value='-'(hyphen).
I have been going through a number of articles on this and came across the purgechar() function.Also applied the code without the function:- if(Field='-','N',Field) as Field
Still no success!
Please help!
Could you post your field values or attach sample file.?
Try:
if(wildmatch(Field,'*-*'), 'N', Field) as Field
if the aim is to check on this string. If you want to check if the field contained any content and isn't NULL then use:
if(len(trim(Field)) = 0, 'N', Field) as Field
- Marcus
May be you can also try this:
If(Len(Trim(PurgeChar(Field, '-'))) = 0, 'N', Field) as Field
if Field= '-', then you need to update the field with 'N'. In this case need of Purgechar() function
Try with the bellow condition
If(Len(Trim(Field)) = 0, 'N', Field) as Field