•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
How to count based on the results of a GROUPBY?
I have a table of donors and their gifts. Many people gave more than once, but some didn't giveat all. So I can do a
=GROUPBY(list[donor], list[gift], SUM) and I can see that a few of the donors have 0 so they didn't give. I want to get a count of these people, and i can't figure out a way to do that. I tried wrapping it in a COUNTIFS but that just produces an array of 0s.
Basically I want the equivalent of SQL's HAVING function. Any thoughts?
EDIT: got it figured out! I just need to repeat the whole choosecols bit in the filter:
=COUNT( FILTER( CHOOSECOLS( GROUPBY( FY24Trustees[TrusteeName], FY24Trustees[GiftAmount], SUM ), 2 ), CHOOSECOLS( GROUPBY( FY24Trustees[TrusteeName], FY24Trustees[GiftAmount], SUM ), 2 ) = 0 ) ) [link] [comments]
Want to read more?
Check out the full article on the original site
Tagged with
#no-code spreadsheet solutions
#rows.com
#Excel compatibility
#Excel alternatives for data analysis
#Excel alternatives
#cloud-based spreadsheet applications
#GROUPBY
#COUNT
#FILTER
#SUM
#CHOOSECOLS
#HAVING
#donors
#gifts
#donor
#TrusteeName
#GiftAmount
#count
#COUNTIFS
#array