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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Count if and set analysis

Hi,

 

what’s the best way to do the following.

Count all employees

If(count({<field = {yes}, field2 = {no}>}counter) = 1,1,0)

I need to do aggr counting all the employees where there’s a 1 in the IF statement.

 

the expression is to go into a table with 1 row of data, I don’t want to add the employees field, hence I think I’ll need a aggr.

 

thanks

 

1 Reply
MayilVahanan

Hi

Try like below

Sum(Aggr(If(count({<field = {'yes'}, field2 = {'no'}>}counter) = 1,1), Employees))

or

Sum(Aggr(If(count({<field = {'yes'}, field2 = {'no'}>}Distinct counter) = 1,1), Employees))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.