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: 
Anonymous
Not applicable

Count Set Analysis Help

I am attempting to count a check within a certain range.  One check addresses multiple items so I need to total the amount and count the check as '1'  I keep getting an error, i know it is a set analysis can you see where my issue is in the statement below.

=count(DISTINCT(If([CHK_NO] >= Sum(TOTAL {<[PAID_AMT] ={">0<2500"}>}[PAID_AMT]))))

Also tried...

=count(DISTINCT(If([CHK_NO] >= 0 and sum([PAID_AMT]) <= 2500, sum([PAID_AMT]))))

Any assistance is greatly appreciatted

5 Replies
sunny_talwar

Not sure what you are trying to do... would you be able to share some data and the output you expect to see from it?

Anonymous
Not applicable
Author

Here is the output I am using you will see i get counts, but the numbers are wa off, it seems to be counting the amounts and not the checks. Note in the second screen shot i selected 1 check and it counts it 5 - 6 times.

help file 1.PNG

help file 2.PNG

Anonymous
Not applicable
Author

Hi,

What are you trying to count. Seems like you are not counting anything

Anonymous
Not applicable
Author

Hello Thabang;

    I am attempting to count the number of individual checks in a specific amount range.  I have 4 defined ranges and I am not sure if i am doing the SA correct.  Per the image below, note i have one check selected so it should just be the SUM of that 1 check, but it lists the amounts individually as if they were separate checks.help+file+2.PNG

Anonymous
Not applicable
Author

Hi Richard,

Perhaps move the check into the backend script and treat as a kind of flag.

Then in your set analysis, use the flag