Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tattooedhiker
Contributor
Contributor

Count

I am using Qlik Sense to create a quarterly report. I would like to capture all data for [ATS Return Volume (ml)] that is over 250, otherwise count [ATS Collected Volume (mL)]. 

Thank you!

NOT WORKING: COUNT(if[ATS Returned Volume (mL)]={>250},count([ATS Collected Volume (mL)]

Labels (1)
1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

the problem in your formula is caused by the nested use of the aggregation function count, you can't do that without using AGGR in between, and in your case you don't really want to do it this way. Also, a bunch of missing parentheses and the curly brackets that are only used in Set Analysis - all these would make this formula invalid...

If you need to compare individual field values, then the syntax should be this:

COUNT( if ([ATS Returned Volume (mL)] >250, [ATS Returned Volume (mL)] , [ATS Collected Volume (mL)])

I don't fully understand your business logic, so I'm not sure that this is exactly what you need. The COUNT function produces the count of instances of various numbers, not the sum of these numbers. I have a feeling that you need a sum instead.

If you can formulate the business logic behind your question, I might be able to help you better.

Cheers,