Discussion Board for collaboration related to Creating Analytics for QlikView.
I am trying to create an IF statement to classify different field values into normalized ranges. I want to make it so if FIELD starts with B it is categorized as 1 in NewField.
I have created the statement below but it is not working as desired. Any help would be appreciated.
If([FIELD] LIKE 'B%','1',
If([FIELD] LIKE 'Y%','2',
If([FIELD] LIKE 'P%','3',
If([FIELD] LIKE 'F%','4',)))) AS NewField
Go to Solution.
Try this may be:
Pick(WildMatch(FIELD, 'B*', 'Y*', 'P*', 'F*'), 1, 2, 3, 4) as NewField
assuming you were using % for wild card
pick(wildmatch(FIELD, 'B*', 'Y*', 'P*', 'F*', '*'), '1','2','3','4','other') as NewField
Thank you Massimo. Marked as helpful