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: 
rbarnes0118
Contributor
Contributor

Count If.....

Hi - 

Not sure if this is the right place but I'm trying to create a Function Expression for a pie chart.  I only want the function to count if it has "Y" as a response to whether or not employees took the training.

Thanks!

3 Replies
bharathadde
Creator II
Creator II

if you need expression for percentage response 'Y'

=Count(Response='Y')/Count(Response) and make number as percentage

if you need expression for percentage response 'N'

=Count(Response='N')/Count(Response) and make number as percentage

dwforest
Specialist II
Specialist II

two options:
Sum(If(Response='Y',1,0))
or
Count({<Response={'Y'}>}Response)
I'd probably count the "ID" field over the Response field
rbarnes0118
Contributor
Contributor
Author

Thanks...however I have a column called "Current Product Training" and withing that column it has 'Y' for those that took the training and 'N' for those that didn't .  I'm trying to compare it against the different employee titles.  So dimension is "Employee Title" and Measure is "Current Product Training".  I'm only looking for a percentage of "Y" from the Current Product Training Measure.  Would the formula you suggested still work?