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: 
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?

Labels (1)
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