Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
s10157754
Creator III
Creator III

Check if text contain specific words (Calculated Dimension)

Dear Qlikview Experts,

What is the correct syntax for calculated dimension to check if a text contain specific words? I wanted to create a bar chart with data

looks like below, I have used 'Type' as my first dimension, follow with a calculated dimension and my expression is :Value.

I want to modify my calculated dimension such that when 'Product' = Equipment / (Any text contains 'Pen' )

My calculated dimension is: "=if(Match(Product ,'Equipment','*Pen*'), Product) "   But it does not work

(It works if I key in full text, but I need to deal with a large amount of text in future and most of them contains 'Pen')

I had also attached a sample of testing qvw for your reference. Thank you for your help in advance!

1.PNG

Capture2.PNG

Best Regards

1 Solution

Accepted Solutions
jayshrinipurte
Partner - Creator
Partner - Creator

Hi Zhang,

Try this, May b it will work

=if(WildMatch(Product ,'Equipment','*Pen*'), Product)


Regards,

Jayshri

View solution in original post

7 Replies
kruppas78
Contributor III
Contributor III

I tried it with a classic SetAnalysis

jayshrinipurte
Partner - Creator
Partner - Creator

Hi Zhang,

Try this, May b it will work

=if(WildMatch(Product ,'Equipment','*Pen*'), Product)


Regards,

Jayshri

shiveshsingh
Master
Master

Can you try with wild match?

shiveshsingh
Master
Master

if(WildMatch(Product ,'Equipment','*Pen*'), Product)

s10157754
Creator III
Creator III
Author

Dear Jayshri,

It works like a charm! Thank you so much!

Best Regards

QianNing

s10157754
Creator III
Creator III
Author

Dear Shivesh,

It works! Thank you!

Best Regards

QianNing

jayshrinipurte
Partner - Creator
Partner - Creator

Welcome QianNing