Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Meg00
Contributor III
Contributor III

SET analysis Help

Hi!

I wist to Count number of employees in current period:

Count({$<MonthYear ={"$(=Max(MonthYear))"}>}distinct EmployeeID)

but I would like to add to only Count [Employee Category] 'A' .

How can I do this?

2 Solutions

Accepted Solutions
BlakeGri2093
Contributor III
Contributor III

Try this

Count({$<MonthYear ={"$(=Max(MonthYear))"},Employee Category={'A'}>}distinct EmployeeID)

View solution in original post

Vegar
MVP
MVP

Try to expand your set with another modifier for   [Employee Category] like this:


Count({$<
   [Employee Category] = {'A'},   
   MonthYear ={"$(=Max(MonthYear))"}
    >}distinct EmployeeID)

View solution in original post

4 Replies
BlakeGri2093
Contributor III
Contributor III

Try this

Count({$<MonthYear ={"$(=Max(MonthYear))"},Employee Category={'A'}>}distinct EmployeeID)

Vegar
MVP
MVP

Try to expand your set with another modifier for   [Employee Category] like this:


Count({$<
   [Employee Category] = {'A'},   
   MonthYear ={"$(=Max(MonthYear))"}
    >}distinct EmployeeID)

Vegar
MVP
MVP

@BlakeGri2093 You need to bracket your Employee Category modifier either like this [Employee Category] or like this "Employee Category" in order to get your expression to work.
Meg00
Contributor III
Contributor III
Author

Seems to work!

Thank you!