Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate total count of a specific value in a field?

Hi All,

I am trying to calculate the count of a specific value in a field. I would like a table with 'Topic,' and when i pick a specific topic I am able to get a total count from a Yes/No field 'Validation.'  For example: Topic = documents and the validation has 24 docments have YES and 6 NO.  How can I get it to show the total YES/NO count based on criteria I pick?  I currently have my Dimension = Topic, Expression = count(distinct(validation).

Thank you for your help.

1 Solution

Accepted Solutions
Not applicable
Author

Looks like my image didn't come across. Here you go:

QVCommunity.JPG

View solution in original post

8 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You will need something like

     Count({<Validation = {'yes'}>} Validation}

     or

     Sum({<Validation = {'yes'}>} 1}

Hope the helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Remember that QV field names are case-sensitive - validation <> Validation

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

That does work, thank you.  How can I take it one step further so that when I pick a topic, say "Large reports," it will show me that out of 20 Topics, there are 10 large reports and 'x' are yes and 'x' are No validations?

Not applicable
Author

I would suggest building a Straight Table Chart with your 'Validation' field as the Dimension and Count(Validation) as the expression. This will look something like this:

QVCommunity.JPG

Not applicable
Author

Looks like my image didn't come across. Here you go:

QVCommunity.JPG

Not applicable
Author

Thank you for your response. I have done the validation table, but when I click on a specific Topic, the table does not change.  It continues to show the total of the count of all validations.  I though it would adjust as you dive deeper into specifics.

Not applicable
Author

Hey, I figured out the problem.  The key field in which i was connecting too was somehow not allowing it to link correctly. The the working formula was Count({<Validation = {'yes'}>} Validation}. Thanks Jonathan and  Rebeccad.

diwaskarki
Creator II
Creator II

how can I do this in a pie chart?