Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Summing Fields

Featured Replies

  • Newbies

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?

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

  • Author
  • Newbies

Yep, that works beautifully, thanks.

  • 2 weeks later...

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

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.