Your calculation is going to give you the number of hours divided by the number of days worked.
If you created one record for each day worked and it contains the number of hours worked on that day, then you can get the same result by using a summary field. Use summary average of hours worked.
Hours worked are only kept by the week, not the day.
My calculation is not working. I am pretty sure the calculation is not properly counting the number of weeks worked (or records) in the FMP database. Count(Week) is not working.
1 of 1 people found this helpful
I recommend describing the tables, records and relationships that store the data you want to incorporate into this calculation. How you set that up can make a big difference in how you might use them in a calculation.
I am too new to FMP to know what you are saying. Would you kindly give me the proper code that would allow my calculation to do what I am attempting? I have no idea why it is not working. As far as I can tell, and after researching this, I can't find my mistake.
"Would you kindly give me the proper code that..."
Nobody can help you until YOU describe your system in more detail.
can you print (to PDF) just the fields you have used in this calculation from the Define Fields dialog?
go to File Menu
select Manage (Database)
click on the Fields tab
command-click each field (on MacOs) or control-click each field (on WinOS) to select
click the Print button and choose PDF
(just those fields selected will be printed)
post to this thread
awesome screen shots!
Summary fields are associated with groups of records. The value in a summary field can change depending on where you place the field on a layout, how many records are in the found set, and whether the records are sorted.
So your calculation may need to rely on the above quote from the help topic.
You may need to study this function: GetSummary()
However, you may not be "summarizing" by find and sort, but actually need other aggregate functions:
such as Sum() and Average() rather than the summary field types.
Am I mistaken that the command (if command is the right term) to count the number of records in a field is Count(fieldName) ? Shouldn't Count(Week) give the return of the value 3 because there are 3 records? I am using Summary commands in other places and it is working just fine.
I will read through your provided links tomorrow as it is bed time for me now.
Again, I appreciate the assistance.
I figured it out:
Alex Yearly Total/((Get(TotalRecordCount) * 5) - Alex Days Off Total)