Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
Wondering if you could help with this. I have a field in a data table that may or may not contain the string "SORD". This could be anywhere in the text string.
What I'd like to be able to do is create a flag (1 or 0) as a new field depending on whether the text string SORD exists in the field. I can do it in Excel but can't get it working in Qlik!
Thanks in advance
Stu
Hi,
Try WildMatch() or substringcount(). Check help file for examples.
LOAD
*,
If(substringcount(Dimension, 'SORD')>0, 1, 0) as Flag
FROM DataSource;
OR
LOAD
*,
If(WildMatch(Dimension, '*SORD*')>0, 1, 0) as Flag
FROM DataSource;
Regadrs,
Jagan.
Hi,
Try WildMatch() or substringcount(). Check help file for examples.
LOAD
*,
If(substringcount(Dimension, 'SORD')>0, 1, 0) as Flag
FROM DataSource;
OR
LOAD
*,
If(WildMatch(Dimension, '*SORD*')>0, 1, 0) as Flag
FROM DataSource;
Regadrs,
Jagan.
Try like:
If(SubStringCount(YourField, 'SORD')>0, 1, 0) as Flag
Marvellous - thanks to both of you that works a treat!
Have a good day.
Stu