2 Replies Latest reply: Aug 31, 2017 11:36 AM by Jeremy Lopez

# Count If Sum Analysis

I've tried several different types of set Analysis with no luck. The information is sensitive so I replaced the names of the fields with Field 1 and Field 2.

We have a straight table broken out by ID that has a calculation Sum(Field1)/Sum(Field2) Formatted as a %. To show what each ID is current producing. Easy enough

I've been asked to create a KPI that counts How many ID's have Sum(Field1)/Sum(Field2)  <= .5

I've searched and searched and tried to apply my formulas to what I have found in the community with no luck. It seems easy enough, but any calculation I try does not work.

What I have tried so far:

Sum(Aggr(if(count(Sum(Field1)

/

Sum(Field2)) <=.5), Distinct ID))

Produces a 0 result

____

=COUNT({<Sum(Field 1)/Sum(Field 2) = {"=count((Sum(Field 1)/Sum(Field 2)))<=.5"} >} DISTINCT ID)

Calculation has error

• ###### Re: Count If Sum Analysis

Try this

Sum(Aggr(If(Sum(Field1)/Sum(Field2) <=.5, 1, 0), ID))

Or this

Count(DISTINCT {<ID = {"=Sum(Field1)/Sum(Field2) <=.5"}>} ID)

• ###### Re: Count If Sum Analysis

Thank You! It appears to work perfectly.