Skip 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.

SUM function in relationship

Featured Replies

I am stuck on this...

The data i have consists of 3 fields.

Code is an identifier

Views is number of times a "code" has been seen

Type can be either A or B


Code    Views    Type    

001       5        A   

001       5        A    

001       3        A   

001       7        B

002       3        A

002       1        A

002       2        B

002       5        B

I can work out the total "views" for each "code" using the SUM function across a self join (code to code)

e.g in the example above, "001" has a total of 20 views (5+5+3+7), "002" has a total of 11 views (3+1+2+5).

What i want to do is find the totals for "code" and "type", so in the example above, "001" has a total of 13 views (5+5+3) for "type" A and 7 views for type "B". "002" has a total of 4 views (3+1) for "type" A and 7 views (5+2) for "type" B

I just can't work out how to get those figures calculated. Have attached an example file with the above data.

Any help greatly appreciated

TEST.fp7.zip

Well, you could add a calculation field =

Case ( Type = "A" ; Views )

then sum this field separately. The other sum is of course the difference between this and the total.

However, the "correct" Filemaker way to do this is to produce a report, sub-summarized by Code and Type. Then all you need is one summary field = Total of Views.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.