Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7420 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

In a database I have a bunch of records about people, and each person is designated by a unique ID code. There are multiple records for each person, though (each record represents one person for a particular year).

What I want to do is sum the data over all the years for each particular person in a new table (or a new database). Anybody have any ideas? Maybe a script?

Posted

So each record for a person has the same person-ID number attached to it, regardless of the year? I'm assuming yes.

If so, you want to create a self-join relationship. If your table is called people, create another table occurence (TO) called People2. Relate them by the ID number. THen create a calc field for your sum:

sum(People2::YourDataField)

This will give you the sum for each person across all years for that data.

HTH,

Dan

  • 2 weeks later...
Posted

I have a similar setup on one of my databases so I tried this suggestion. It worked great, except when the total is a negative number. For example if I have two records that should add up to -150 it says -250. Any ideas what might cause this?

-Tanner

Posted

Just a quick update. The negative numbers actually are double what they should be. So if the number is supposed to be -25 it reads as -50. Any ideas would be greatly appreciated.

This topic is 7420 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.