Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Count if contains a specific letter

Hi all,

        I'm trying to count the amount of cells in a column that contains a J. I'v tried COUNT(IF(Job='J',Job)) but it returns with a 0, which i know isn't true.

        I'm quite new to this and realise this is probably a silly question with a simple answer, but i did have a google to no avail.

Thanks in advance

1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: Count if contains a specific letter

I see nothing wrong with your expression. That implies that there are no records where Job = 'J'.  Perhaps there are spaces after the J?

You might try: if(trim(Job)='J'

or: if(index(Job,'J')>0

2 Replies
mwoolf
Honored Contributor II

Re: Count if contains a specific letter

I see nothing wrong with your expression. That implies that there are no records where Job = 'J'.  Perhaps there are spaces after the J?

You might try: if(trim(Job)='J'

or: if(index(Job,'J')>0

Not applicable

Re: Count if contains a specific letter

Brilliant, thank you!  The second one worked a treat!