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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
m_woolf
Master II
Master II

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

View solution in original post

2 Replies
m_woolf
Master II
Master II

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
Author

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