Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Include a Condition in a #1 KPI.

@Dear Qlik Community

I've chooses a KPI to show how many employess work in a company, by using the count expression. However, people either work in Sales/Marketing or Production. I would like to include that as a condition in my KPI. I tried the following:

=count(if([job_function]='Production'_A,[job_function])

However it doesn't work. Does anyone has a hint for me?

Thanks and kind regards,

Rebecca

11 Replies
micheledenardi
Specialist II
Specialist II

Maybe:

Count({<[job_function]={'Production'}>}[job_function])

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
felipedl
Partner - Specialist III
Partner - Specialist III

Hi Rebecca,

Use set analysis for it, something like:

count({<job_function{'Production','Sales','Marketing'}>}job_function)

Anonymous
Not applicable
Author

perfect. this it is

Anonymous
Not applicable
Author

The recommendation form Michele De Nardi was the one I was looking for.

Thank you all.

YoussefBelloum
Champion
Champion

Hi,

what is that '_A' ? and there is a missing bracket..

exp.png

agigliotti
Partner - Champion
Partner - Champion

I think you need something as below:

count( distinct employerID )

sunny_talwar

What is the additional _A used for?

Capture.PNG

Anonymous
Not applicable
Author

this was a mistake in the expression

micheledenardi
Specialist II
Specialist II

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.