trinket Posted July 22, 2008 Posted July 22, 2008 In order to fill out my IRS quarterly payroll form, the IRS wants to know how many employees were paid during the quarter. My current quarterly report has 11 records. It shows that I have written 11 checks for two employees (one employee received 10 checks, the other employee received 1 check). Every summary field I have tried so far gives me 11 rather than 2. Any help? Thank you.
comment Posted July 22, 2008 Posted July 22, 2008 (edited) This is a tricky one - it requires three fields: 1. sCountSerialID, Summary = Count of SerialID (or any field that's never empty); 2. cInverseCount, Calculation = 1 / GetSummary ( sCountSerialID ; EmployeeID ) 3. sCountEmployees, Summary = Total of cInverseCount The last field will show the count of distinct employees. Edited July 23, 2008 by Guest Changed hyphens to commas, so that they are not mistaken for minus 2
trinket Posted July 23, 2008 Author Posted July 23, 2008 Wow. O.K. I'll give it a try. Thanks for the solution. I should be able to get to it tomorrow after I return from work. Thank you again.
trinket Posted July 23, 2008 Author Posted July 23, 2008 Thank you so much for your help. The solution worked perfectly and it was very easy to do. I also noticed your edit, and either way, your help was easy to understand. Thank you again.
jim lee Posted October 14, 2008 Posted October 14, 2008 I'm trying to do the exact same thing. Can't get it to work. I don't understand the inverse count thing. What's this bit trying to do? Thanks! -jim lee
comment Posted October 14, 2008 Posted October 14, 2008 It divides 1 by the number of records in each group. The sum of the fractions for each group is 1, and the grand total is the number of groups. 1
jim lee Posted October 14, 2008 Posted October 14, 2008 (edited) Wait! I got it to work. You have to sort on exactly the field you use for the break field. IE you can't sort on the person's name if you use the person's ID as the break field. Then it worked! Thanks -jim lee Edited October 14, 2008 by Guest
comment Posted October 15, 2008 Posted October 15, 2008 That's right: sub-summaries, including GetSummary(), only work when records are sorted by the designated breakField. Another thing to keep in mind is that breakField must be a local field - so if PersonID is a foreign key, and you need to sort by the related people's names, you must define a local calculation field = People::Name and use it as your breakField.
Newbies benji Posted March 14, 2009 Newbies Posted March 14, 2009 Yeah, that is a tricky one. I think there should be a "Count of" summary field option for "Unique count". I submitted a feature request at: http://www.filemaker.com/company/feature_request.html It seems like it wouldn't be too hard for them to add that one in. If FM can find duplicate values in a Find Request (!), it should be able to figure out unique values in a Count.
Recommended Posts
This topic is 6076 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now