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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
JRamos
Contributor III
Contributor III

Count.if

Hi there,

I'm trying to count per person how many 'yes' and 'no' does they have, but always shows me the total of the counting, I need a column with the total of 'yes' and another one with the total of 'no', could you support me? I'm new using QlikSense

JRamos_0-1632796349339.png

Regards!!!

1 Solution

Accepted Solutions
anthonyj
Creator III
Creator III

Hi @JRamos ,

The easiest way to get a table that will give you the count of Yes and No per person will be to use a Pivot Table.  So if you replace your table with a Pivot and add the column that holds the Yes and No to the columns then Qlik will separate them for you.

Let me know how you go.

Thanks

Anthony

View solution in original post

4 Replies
anthonyj
Creator III
Creator III

Hi @JRamos ,

The easiest way to get a table that will give you the count of Yes and No per person will be to use a Pivot Table.  So if you replace your table with a Pivot and add the column that holds the Yes and No to the columns then Qlik will separate them for you.

Let me know how you go.

Thanks

Anthony

PrashantSangle

Hi,

 

Can you explain with Sample data, Also let us know where you want to achieve it, in script or in front end.

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Vegar
MVP
MVP

assuming you have a datamodel containing the following data.

Person  - the names from your image

Answer - the response from the person, contains the values 'Yes' and 'No'.

As @anthonyj replies, the most dynamic solution would be to use both Answer and Person as dimensions and Count(Answer) as a measure in an pivot table or other chart object.

If you want to calculate the no of Yes and No without dragging the Answer in a a dimension then you could look into Set Analysis. Try something like this:

=Count({<Answer={'Yes'}>}Answer)

=Count({<Answer={'No'}>}Answer)

 

JRamos
Contributor III
Contributor III
Author

Hi all, thank you for your time and answers,

I used a pivot table as @anthonyj and @Vegar  mentioned, I just modified the names "yes and no" to "carry and new" because the system don't let me used something like a boolean system, here my result:

JRamos_0-1632835470355.png

Thank you so much!