Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bashar_f
Partner - Creator
Partner - Creator

How to Add Where Clause to a Variable Definitions

Hi,

I have a variable.called [vAdmissionsCount]

I'd like this variable to be defined as

count(emplid)  Where prog_action = ADMT or MATR


prog_action being one of the fields, I get red lines all over, what am I doing wrong?

2 Replies
VishalWaghole
Specialist II
Specialist II

Hi Bashar,

Try this

count({<prog_action = {'ADMT','MATR'}>}emplid)


-- Regards,

Vishal Waghole

er_mohit
Master II
Master II

Try this

count(distinct  if(wildmatch(prog_action,'ADMT','MATR'),emplid))


here distinct  keyword gives you the unique records means count single empid if it comes repetative