Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count for specific values

I have the following table

department       Overall Satisfaction

---------------       ------------------------------

Inpatient            Extremely Satisfied

Inpatient            Satisfied

Outpatient         dissatisfied

Inpatient           dissatisfied

Outpatient         Satisfied

I want to get the following formula ( Extremely satisfied + Satisfied) of inpatient / Count( department = 'Inpatient)   

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try:

count({<[Overall Satisfaction']={'Extremely Satisfied','Satisfied'},department={'Inpatient'}>} department) / count({<department={'Inpatient'}>}department)

or maybe you want to count Satisfied or Extremely Satisfied for both departments and then divide by the count of department Inpatient:

count({<[Overall Satisfaction']={'Extremely Satisfied','Satisfied'>} department) / count({<department={'Inpatient'}>}department)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try:

count({<[Overall Satisfaction']={'Extremely Satisfied','Satisfied'},department={'Inpatient'}>} department) / count({<department={'Inpatient'}>}department)

or maybe you want to count Satisfied or Extremely Satisfied for both departments and then divide by the count of department Inpatient:

count({<[Overall Satisfaction']={'Extremely Satisfied','Satisfied'>} department) / count({<department={'Inpatient'}>}department)


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks dude your a life saver