Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
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

2 Replies
Hoffman14
Contributor
Contributor

The individual statements are represented as p and q and the compound statements are represented by one of p v q, p ^ q, p ⇒ q, p ⇔ q. An example of a compound statement using the connective word 'or' is "It is raining outside or it is sunny.".   Costco ESS Login

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.