Forum Discussion
Count across other files
Member ID | Active |
1 | Y |
2 | N |
3 | Y |
4 | N |
5 | N |
6 | N |
Member ID | Active |
1 | N |
2 | N |
3 | Y |
4 | Y |
5 | Y |
6 | N |
- mathetesSilver Contributor
Let me suggest that--if it's something you're in a position to do--you create a single database rather than separate monthly ones. Just add a column to represent the month. Once you've done that, a Pivot Table will do all the work for you. See the attached.
(Note: to make it easier to sum the activities, I used a 1 instead of "Y" to indicate activity. But you could also let the Pivot Table just count by entering only the "Y" when a person was active in a given month; by omission, the blank would mean 'N" and the blank would not be counted. If you wanted to get more granular (and thereby more substantive or meaningful), you could record every date the person was active and count those by month)
- chrishall166Copper Contributor
Thanks all for your help so far!
I've had additional issues with @sumproduct not working on other laptops, I think due to different versions so have rewritten the spreadsheet to make it more reliable.
Issue still remains with how to count activity / attendance over the last 6 months period.
I've created an additional table below showing activity be members over the months. A '1' indicates that the member has attended at least once in the month.
The specific question I need to answer is "How many members have been actively attending the pantry in the last 6 months?"
I don't need to count how many visits per member, just if a member has attended any time within the last 6 months then that will count as a "1".
So for March the answer would be "2".
For April the answer would be "4"
For May the answer would be "6"
The awkward part is the table will need to cover one year and so will need to include the previous 6 months data, which I can manually copy over from the previous years file.
Thanks!
Attendance Member Number Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 2 0
0 0 0 0 0
0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - mathetesSilver Contributor
I don't see a connection between the data you show in that matrix and the question you ask.
Is it possible for you to post an actual spreadsheet rather than just text in a posting? If you can't attach it directly as I did in my earlier response to you, then post it on OneDrive or GoogleDrive and paste a link here that grants access.
- peiyezhuBronze Contributor
online sql:
select count(distinct(f03)),group_concat(distinct(f03)) from consolidateSheet where f04 like 'Y'
ā
- Tejas_shahBrass Contributor
May I clarify what are you going to show at the beginning of the year (in Jan, Feb, Mar, etc) where you have no 6-months back history?
As a comment, from data modelling point of view it's always better not to split workbook on monthly sheets but keep in one sheet log table for all members and all periods, creating all kind of reports based on it.
Finally, which Excel platform/version do you use?
- chrishall166Copper ContributorHi Sergei, thanks for the response.
This is all to do with a charity providing food for those in need, not a gym as I put in my first post. As we have received funding from a council they are asking for activity stats and reporting these stats is where the headache is.
We only have 3 months of data so we have to provide that in lieu of 6 months. The people engaged by the charity who deal with the clients may have little or no experience of Excel so I don't want to send them a huge file which they may break!
So I send them a file for each months which provides some monthly stats. I then manually transfer a small table to the new sheets for other cumulative stats.
As I'm writing this in response I've just thought of a way to do what I need to do so I will go away and have a play. If I hit a dead end I may be back for more ideas!
Thanks
ChrisHi Chris,
So, here is half administrative half technical task. From administrative point of view it's desirable what clients provide you information in exactly the same format for all them. As simple as possible taking into account they have no experience in Excel, but have all necessary information. I guess the key point period shall be mentioned.
Technically it's better not to add each such report into separate sheet but keep log in one master sheet appending report one to another. Perhaps some problem will be to add period for each record, but that's solvable. Hope these activities will continue for years and one master log will be more reliable solution.
Having master log you may generate any report for your sponsors or for your own needs. Using formulae or PivotTable.
All above could be done fully automatically or half-automatically, depends on platform you use.
Anyway, it's better to have samples of actual report with sensitive information removed.