Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hammermill21
Contributor II

Count if Contains Specific Letters

HELLO,

I'm trying to get a count of a standard that contains the letters EC in there.

I have a list of standards that have data like:

EC.02.05.03

EC.02.05.03

EC.02.05.03

EM.02.05.03

LC.02.05.03

So I'm trying to count how many start with EC and everything I've tried doesn't work.

I tried the following:

IF(INDEX(STANDARD,'EC')>0

COUNT(IF(STANDARD='EC',STANDARD))

if(trim(STANDARD)='EC'

Nothing seems to work

1 Solution

Accepted Solutions
MVP
MVP

Re: Count if Contains Specific Letters

Try this

Count({<STANDARD = {"EC*"}>}STANDARD)

4 Replies
MVP
MVP

Re: Count if Contains Specific Letters

Try this

Count({<STANDARD = {"EC*"}>}STANDARD)

MVP
MVP

Re: Count if Contains Specific Letters

Or this

Count(If(WildMatch(STANDARD, 'EC*'), STANDARD))

MVP
MVP

Re: Count if Contains Specific Letters

If( STANDARD Like 'EC*' , ...... )

https://help.qlik.com/en-US/sense/February2018/Subsystems/Hub/Content/Scripting/Operators/StringOper...

or

Count( {<STANDARD={'EC*'}>} STANDARD)

hammermill21
Contributor II

Re: Count if Contains Specific Letters

Thank you for the link!