Forum Discussion
CWsChim
Feb 02, 2023Copper Contributor
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.
Entity | Member Count | Rating Met: Y/N |
A | 437 | N |
B | 522 | N |
C | 46 | Y |
D | 333 | N |
E | 12 | Y |
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
Sort By
- PeterBartholomew1Silver Contributor
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]
- OliverScheurichGold Contributor
- CWsChimCopper ContributorThank you!