Accumulate sum field


I have 3 objects


-Task1 (with a numeric field in it call time and connected with projects)


And I was trying to get a field with the sum of time on the task 1 by project but for some reason I haven been able to do it.

Can somebody help me with this?