Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter

Hi, I am currently using wildmatch to create a filter that searches a specific column for the presence of a number of strings.

for example, the column would be called Fruits and a value inside of it would look like

Apple, Pear, Peach, Orange, Apple Pear

Currently, I have several filters with the following codes:

If(WildMatch([Fruit$.Fruit Type],

'*Apple*',

'*Orange,*',

'*Grape,*',

'*Pear*',), 'Tasty Fruits')

If(WildMatch([Fruit$.Fruit Type],

'*Lemon*',

'*Lime,*',

'*Apple Pear,*'), 'Decent Fruits')

I would like to be able to filter and only show things that are 'Tasty Fruits' . However, in the case of Apple and Apple Pear, the Tasty Fruits Filter would pick up Apple Pear as Apple due to the asterisks.

Is there any way to fix this problem? Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps like this:

If(WildMatch([Fruit$.Fruit Type],

'*Apple,*',

'*Apple',

'*Orange,*',

'*Grape,*',

'*Pear*',), 'Tasty Fruits')


If(WildMatch([Fruit$.Fruit Type],

'*Lemon*',

'*Lime,*',

'*Apple Pear,*'), 'Decent Fruits')



talk is cheap, supply exceeds demand

View solution in original post

4 Replies
OmarBenSalem

Change this :

If(WildMatch([Fruit$.Fruit Type],

'*Lemon*',

'*Lime,*',

'*Pear,*'), 'Decent Fruits')

Not applicable
Author

Hi Omar,

Thanks for the reply. I have tried this. However, by adding the comma before the asterisk, I would be unable to check if the last item in the list is a part of the filter due to it not having a comma after it. Would anything else work?

Thanks

Gysbert_Wassenaar

Perhaps like this:

If(WildMatch([Fruit$.Fruit Type],

'*Apple,*',

'*Apple',

'*Orange,*',

'*Grape,*',

'*Pear*',), 'Tasty Fruits')


If(WildMatch([Fruit$.Fruit Type],

'*Lemon*',

'*Lime,*',

'*Apple Pear,*'), 'Decent Fruits')



talk is cheap, supply exceeds demand
Not applicable
Author

Thank you Gysbert!