Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rams_school
New Contributor III

How do I convert the following SQL Statement to an expression?

I have following columns.  'TravelSummary', 'Month'

Travel summary is a text field. The column TravelSummary will be similar to the below

During this trip I visited the following offices in  London,Bristol, Italy, New York and Boston

I would like to generate a graph with Dimension (Month),  count the users visited selected city.  Expression (A string extracted from Travel Summary) similar to the below sql statement

=count(SELECT * FROM mytable
WHERE TravelSummary LIKE '%word1%')


How do I generate expression?


Thank you

Tags (1)
1 Solution

Accepted Solutions
lironbaram
Honored Contributor II

Re: How do I convert the following SQL Statement to an expression?

hi

you can use

count(if(wildmatch(TravelSummary,'*word1*')>0,TravelSummary))

2 Replies
lironbaram
Honored Contributor II

Re: How do I convert the following SQL Statement to an expression?

hi

you can use

count(if(wildmatch(TravelSummary,'*word1*')>0,TravelSummary))

amartinez35
Valued Contributor

Re: How do I convert the following SQL Statement to an expression?

Hi,

Count({<TravelSummary={"*word1*"}>} TravelSummary)

Aurélien