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.

Conditional Sum

Featured Replies

  • Newbies

Hi there,

I've been reading all possibles forums trying to find a solution for my conditional summing, the problem is not so different but i don't know why I can't get it to work.

like this in 1 table:

A field with "IN" and "OUT" as a Radio Botton Set

A field with the Value ( number value )

What I want is to make two new fields that gives me the sum of all INs and all OUTs in the table:

Sum IN

Sum OUT

Thx!

Create two new text fields in your table, make them globals. One will always contain the text "IN" and the other will always contain the text "OUT". If you're working with existing records make sure you actually fill these fields in with that text once you've created them.

Then, create two self joining relationships for your table- one keyed with your first field and the "IN" global field, and the other one keyed with your first field and the "OUT" global field.

Then create two calculation fields in the table, the calculation being the summary of the number fields in records in each respective joined table, obviously evaluated in the context of the root/original table.

Make sense?

OR

Ccreate two additional calculation fields in your table.

for your first calculation field"

if the value of the first field is "ON", then copy the value from your number field, otherwise 0

for your second field

if the value of your first field is "OFF" then copy the value from your number field, otherwise 0

then create two additional "Summary" fields, based on these two calculation fields you've just defined.

Edited by Guest

  • Author
  • Newbies

Awesome!

Thank You!

The second one, worked better for me!

xD

  • 3 weeks later...
  • Author
  • Newbies

Hello again

since its the same topic.

is there a way to do this using matching value list?

Like this:

I have 2 layouts: Accounts and Movements

In Accounts I have these fields: AccountName and AccountValue

and in Movements I have as fields: Account and Value

The field Account is a ValueList that refers to AccountName

How do i get AccountValue as just the sum of Value from all records whenever AccountName = Account

Some think like:

if ( AccountValue = Movements::Account; Sum ( Value from all records in Movements that matches the condition; 0 )

Thank You!

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.