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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
earlcool
Contributor II
Contributor II

count compound statement

I would like to count number of persons over or equal to 18 with a distinct id.

I have

 =Count({<Age={">=18"}>}Age) and =Count(DISTINCT patient_id )

I want a combine the statements to have one count statement

something like =Count(DISTINCT patient_id  where Age>=18)

thanks

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like below

=Count({<patient_id={"=Age >=18"}>}DISTINCT patient_id)

or

=Count({<Age ={">=18"}>}DISTINCT patient_id)

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

View solution in original post

1 Reply
MayilVahanan

Hi

Try like below

=Count({<patient_id={"=Age >=18"}>}DISTINCT patient_id)

or

=Count({<Age ={">=18"}>}DISTINCT patient_id)

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