Forum Discussion

CWsChim's avatar
CWsChim
Copper Contributor
Feb 02, 2023
Solved

Averaging based on a condition

Hello all,

 

I am wanting to calculate a single average value based on a criterion in a range. I have a list of entities, the number of members associated with that entity, and a Y/N categorical field identifying whether the entity meets a certain rating or not. I am wanting to find one average member count when the rating is met. I tried using averageif, but was not successful. See snippet for reference.

EntityMember CountRating Met: Y/N
A437N
B522N
C46Y
D333N
E12Y

 

In this scenario, I want to see the average member count for entity C and E. This is an example set of data but resembles my actual dataset other than having more categorical rating fields and hundreds more records.

 

I am propably overlooking something and hope this is a simple problem. Thanks for any help!

3 Replies

  • CWsChim 

    For consistency, I always use the IFS version of the formulas.  There is little to be gained from having two functions with slightly different syntax to do the same job.

    = AVERAGEIFS(memberCount, ratingMet, "Y")

    [I also use defined names for all references]

Resources