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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
fernandorech
Contributor
Contributor

Count with conditional on text fields

Hello everyone,

I want to count hashtags on text fields, we have 3 hashtags based on the complexity of the task: 'low', 'medium', 'high'

 

Ex: "We need to finish the contract #medium"

I've tried approaches like  count({<text_field={"*#low*"}>} id)

or using wildmatch but none of them works.

 

Could someone help me.

 

Thanks

3 Replies
jheasley
Creator III
Creator III

try using single quotes to create a string in the set analysis statement:

count({<text_field={'*#low*}>} id)

fernandorech
Contributor
Contributor
Author

Hi,

 

Yes, I'm using single quotes on the statement,  I wrote wrong on my question, sorry.

There's another error ?

 

Thanks

Rodrigo_Reis
Contributor II
Contributor II

If you need to count how many records has a specific hashtag, then you will use "count". In this case your current expression is correct.
If you need to count the number of hashtags in a record, then you can use "substringcount".

Can you upload a file as an example?