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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Wildcard and match issue

Hello

I have an issue with trying to use the widcard and match functions

I would like to see where all comments start with *T or *D however the field I am actually using is actually '*T' and '*D' and a widcard also starts with a *

How would I write this

I.e. If(MATCH(comments, * '*T', * '*D',1,0)

Thanks

Helen

Labels (1)
5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try wildmatch instead of match.

Regards,

Kaushik Solanki

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

Hi

Thanks for your reply

Could you kindly help me write this?

When the comments field  starts with a *T or a *D then I would like to put a flag of 1 next to each comment

Any help is greatly appreciated

Thanks

Helen

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Your expresison will be.

     If(WILDMATCH(comments, '*T', '*D'),1,0)

Regards,

Kaushik Solanki

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

Hello

Thanks for your help and you ahve helped me undertsand the syntex, however as the widcard starts with a * and my comment field search also starts with a * I.e. a comment will be  *T 0812305860

The syntex is getting confused with where I want to start seraching as it is also picking up

1801028 T 0025888

Yet I require where the comments always start with *T (Actual start of comments field)

Thanks for your help

helen_pip
Creator III
Creator III
Author

Hello

I have managed to use the replace function to compensate for the fact that my comments field starts with a *

I.e.

 

IF(WILDMATCH(Replace(comments, '*','!'),'!D*'), 1) AS TEST

Thanks for all your help

Helen