Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
eddysanchez
Partner - Creator
Partner - Creator

How can I search in a description field by the character "?"?

I need to search in a specific description field all that are questions, so the rule is ending in "?"

When I did "like *?" the result is not correct because search ? = any one character

Regards

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can use the Index function.

     something like this.

     if(index(FieldName,'?')<>0,1,0) as Flag.

     Index function will give you the position of '?' in the field, if it doesnt find then it will return 0.

     Hope this help.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

5 Replies
Not applicable

What about if(Right(Text,1)='?',1,0)?  Should work.

eddysanchez
Partner - Creator
Partner - Creator
Author

I needed to search '?' in the middle of the text

I used:

if(Replace(Text,'?','|') like '*|*',1,0)

But there should be a better way...

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can use the Index function.

     something like this.

     if(index(FieldName,'?')<>0,1,0) as Flag.

     Index function will give you the position of '?' in the field, if it doesnt find then it will return 0.

     Hope this help.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
swuehl
MVP
MVP

findoneof(Text,'?')

Not applicable

I have used something very similar to this before, I recommend it.