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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
afitzgerald
Contributor
Contributor

Count with OR function

I am new to using Qlik Sense and I am running into an error with a KPI function I am creating. I am trying to count the total number of distinct patients in a program. Throughout the patients' time in a facility, they can be in a variety of the programs, but I want a count of unique patients of these three programs combined. When I use the code below, it will only give me the count for Adult Care 3. If I move Adult Care 1 to the end of the expression, it only gives the count of Adult Care 1. Any suggestions? There are a ton of service programs but I am focusing on these 3 specifically, which is why I can't just do a basic distinct count.

 

=Count({$<Service.Program={'Adult Care 1'}, [Service.Program]={'Adult Care 2'}, Service.Program={'Adult Care 3'} >} distinct ID)

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

=Count({$<Service.Program={'Adult Care 1','Adult Care 2','Adult Care 3'} >} distinct ID)

View solution in original post

1 Reply
stevejoyce
Specialist II
Specialist II

=Count({$<Service.Program={'Adult Care 1','Adult Care 2','Adult Care 3'} >} distinct ID)