sansae

Sum Calculation Issue

Discussion created by sansae on Dec 6, 2016
Latest reply on Dec 7, 2016 by fmpdude

Hi all,

 

I've been struggling to figure this one out. I've searched the forums and I've only come across posts that talk about sum fields that are blank, but not sum fields that return a value (but an incorrect one).

 

Would anyone like to help me figure this out?

Here is the breakdown.

 

Summary: I have a list of records sorted by zipcode. Within each zipcode are records with a field called "turnaround" whose value is a number.

 

Goal: I would like to add all the turnarounds for each zipcode

 

Problem: Summing the turnarounds (i.e. sum (turnarounds) ) gives me only the last turnaround as my result. This is the case for each zipcode.

 

Example:

Zip: 00725

 

     id_Project: 1

     turnaround: 20

     id_Project: 2

     turnaround: 22

     turnaround_sum: 22 (what I expect is 42)

 

Zip: 00726

 

     id_Project: 5

     turnaround: 15

     id_Project: 6

     turnaround: 10

     turnaround_sum: 10 (what I expect is 25)

 

Question: Does this have anything to do with my "perspective"? That is, where I'm "sitting" and what I'm "seeing" or not seeing?

 

Notes (hope it's not too confusing; I'm working on a humongous db and I just started learning fm 4 weeks ago while on the job):

My layout is based on a table called Projects (source table is Projects), but the layout contains fields that are from a TO called Services|Services (source table is Services), which is a duplicate of and is related to another TO called Services|Projects (source table is Services). In other words, (going from left to right), Services|Projects extends Projects, and Services|Services extends Services|Projects.

 

If anything, I'd love it if any of you could share some common reasons as to why a sum calc would only return the last record value?

 

Thanks in advance. Please let me know if you need any more info.

Outcomes