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: 
orangebloss
Creator
Creator

Count if field is like

HI

 

I have a field that contains a string that may or may not include the word 'Lead'. I'm looking to count the occurrence of the word Lead and use it in a pivot table.

 

The closest I've come is

count({<JobTitleDesc={"=JobTitleDesc like '*Lead*'"}>}JobTitleDesc)

but it's not returning the expected numbers which I think is related to it counting inactive heads.

 

The load code (written by someone else far more knowledgeable!) seems to set 'ActiveEmployees' as 1 which I', guessing is the field I need to count?

 

LOAD
EmployeeLink,
FullName,
Function,
1 as ActiveEmployees,

Help on syntax much appreciated!

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Count(If(WildMatch(JobTitleDesc,'*Lead*'), 1))

or

Count({$<JobTitleDesc={"*Lead*"}>} JobTitleDesc)

View solution in original post

1 Reply
BrunPierre
Partner - Master II
Partner - Master II

Count(If(WildMatch(JobTitleDesc,'*Lead*'), 1))

or

Count({$<JobTitleDesc={"*Lead*"}>} JobTitleDesc)