Forum Discussion

CourtneyRapp's avatar
CourtneyRapp
Qrew Cadet
7 years ago

Sum all records based on their name field into a total field of the same table

Their are 3 fields in this relationship:

Field1=Project Name
Field2=Hours (this is hours spent on a specific project)
Field3=Total

I would like Total to show how many hours a specific project has accumulated. So as someone continues to enter records, Field3 would change, but only for the project they specifically listed. Seems simple enough, just can't quite figure it out. 
  • In that case Courtney what you should be able to do is go into the relationship between your Project Name table and your Project table and within that relationship add a summary field. You want that summary field to sum up a total of your Hours field from Projects to Project Name. This will give you a field on Project Name that tracks the total hours of all your Projects related to each project name record. Then you would go into the relationship again and create a lookup field from Project Name to Project that brings the newly created summary field back down to your main table.

    This way you will have a summary of all the data being pulled up and then displayed as a lookup field on each of the child records. Then form there you would be able to create a formula field to do that math for you.
    • CourtneyRapp's avatar
      CourtneyRapp
      Qrew Cadet
      Ah thank you for explaining it this way! I was getting caught up on the lookup field in particular for some reason, but it's all set. Thank you again!
  • Hi Courtney,

    The way you are working now would multiple records have the same Project name and that is the only way they are showing up as the same project? Is there a relationship in place to relate a project together or does projects have an hours table that feeds up the total hours via  relationship?

    In order for multiple records to pass values or summarize up data there needs to be a relationship in place to help collect all those hours worked into a total hours field. 
  • Hi Evan,

    Yes there are various Project names and some records will match based on the project name. Basically this is the structure of the whole table:

    Project Name           Hours                 Total
    Project A                     50                     100
    Project A                     50                     100
    Project B                     25                      25

    So the current relationship in place on this table is with the Project Name table, but as records are added to this one, ideally the total would reflect the sum of hours per project up to that most recent entry. 

    Ultimately I would be using this Total field in another equation to display budgeted time remaining for a project. Sorry if I'm not explaining/understanding everything 100%!