AnsweredAssumed Answered

Calculation field from value in different table (and filtered from yet another field in second...

Question asked by JakeGarrison on May 29, 2012
Latest reply on May 29, 2012 by philmodjunk

Title

Calculation field from value in different table (and filtered from yet another field in second table)

Post

Wow, ok. Let me start off by saying this is making me feel so totally stupid. I'm sorry if I am reposting a question that might already be answered... but I'm having a hard time even wrapping my head around the question that I am trying to ask. 

So, here goes.

Basicly I have two tables (that are important to this question at least).

The first is called: Time Punches

  • Punch Id
  • Employee Id
  • Client Id
  • Project Id
  • Phase Id
  • Start
  • End
  • Total (End - Start and converted to hours) //already got this working
  • Rate
  • Cost (Total * rate) //got this working as well

 

and the second: Phases

  • Phase Id
  • Project Id
  • Client Id
  • Phase Name
  • Labor Budget Hours //the amount of labor hours allowed. Calculated during estimate 
  • Labor Spent Hours
  • Labor Budget Actual //the amount of money set aside for labor. Calculated during estimate 
  • Labor Spent Actual

Ok... this is where im having trouble....

For the table "Phases" the field "Labor Spent Hours" needs to be a total of all "Time Punches::total" cells... but only in rows that have the matching "Phase Id"

I want to do the same with "labor Spent Actual" as well. 

Does this make sense?

My goal is to create a time clock system that will automaticly help me keep track of my labor costs and staying within budget. 

Thanks for your help. I'm really looking forward to using filemaker! :)

Outcomes