Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Qlik Sense community.
I am a new user, so I really need your help/advice.
To briefly break it down, I have a field that is a huge or not so 'messy text', I need to extract a certain word from that and flag that yes, that word is indeed there.
For example, I have one field with a 'dirty' string, the second field is a flag that will show 1 if there is the word 'URVKK' in the string.
Let's say the value of the first field -->
CRM - URVKK - 220408 - 0900 - 08666/r/n/GPA, the next field is a flag that will show 1.
Tried to write the following query, did not help -->
if ([column_1] like '%URVKK%', 1, 0) as flg
ps. dirty text can look different, i.e. it can be: 87678909URVKK; controlurvkk/n/r/
Can you tell me if there is any way to implement this, thanks
you used the wrong wildcard characters with your like operation
if ([column_1] like '*URVKK*', 1, 0) as flg
might work instead.
If the search string is one of a fixed, limited set of strings then you could also use the WildMatch() function:
if (WildMatch([column_1], '*87678909URVKK*', '*controlurvkk*'), 1, 0) as flg
If there are lots of search strings or dynamically changing ones that have to be loaded from some source then you could use a mapping load / MapSubString() approach to check for the presence of those strings.
hope this helps
Marco
you used the wrong wildcard characters with your like operation
if ([column_1] like '*URVKK*', 1, 0) as flg
might work instead.
If the search string is one of a fixed, limited set of strings then you could also use the WildMatch() function:
if (WildMatch([column_1], '*87678909URVKK*', '*controlurvkk*'), 1, 0) as flg
If there are lots of search strings or dynamically changing ones that have to be loaded from some source then you could use a mapping load / MapSubString() approach to check for the presence of those strings.
hope this helps
Marco
Thank you so much, you very help me