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: 
ksomosera10
Creator II
Creator II

Count If Sum Is...

Hi,

I would like to ask how to create a set analysis that can test if the Sum of a certain field is met before it will be included on the count.


I have this sample but I cannot get a good result:

=COUNT({1<KPI_ForProj={1}, nAlloc >= {'100'}>} [Name])

Just to explain some of these variables:

KPI_ForProj -> From script which gets the current month

nAlloc -> Numeric Field which consists of numbers. (100 is the target)

Name -> The person who got the nAlloc of 100


Required:

Get the sum of nAlloc per Name, if the nAlloc is equal of more than 100. It will be counted.


I hope I give my problem clear. Thanks!


I just need a set analysis because mine is not working.


THANKS!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be this?

=COUNT({1<KPI_ForProj={1}, nAlloc = {'>=100'}>} [Name])

View solution in original post

5 Replies
tresesco
MVP
MVP

May be this?

=COUNT({1<KPI_ForProj={1}, nAlloc = {'>=100'}>} [Name])

ksomosera10
Creator II
Creator II
Author

Hi Tresesco,

Thanks! I will try it out...

If its not a burden. can you teach me how you come up with that?

or explain how it works like that. I'm not really good at set analysis.

tresesco
MVP
MVP

There would be many very good resources to learn from. You can search this community for the same to get links like:

A Primer on Set Analysis

Re: Learning Set Analysis from Scratch

ksomosera10
Creator II
Creator II
Author

Wow! That's great!

By the way. Just to check if my idea is right. If ever I need nAlloc lower than 30 does my set analysis would be like this?

=COUNT({1<KPI_ForProj={1}, nAlloc = {'<30'}>} [Name])

mayankraoka
Specialist
Specialist

Yes it will work.

Regards,

Mayank