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.

Calculation Not Working

Featured Replies

I need to average the results in up to 4 fields. There will be times, however, when one or more of the fields will have no result. Following a suggestion from one of the tech forums, I set up the following calculation:

Case(

(AV_1a + AV_1b + AV_1c + AV_1d) = 0, 0,

(AV_1a + AV_1b + AV_1c + AV_1d) /

((not IsEmpty(AV_1a)) + (not IsEmpty(AV_1b))) + (not IsEmpty(AV_1c)))) + (not IsEmpty(AV_1d)))))

)

I just checked one average of 2 results (3.69 + 3.16). Instead of getting 3.43, the calulation is giving me 3.18. What am I doing wrong???

quote:

Originally posted by tmac:

I need to average the results in up to 4 fields. There will be times, however, when one or more of the fields will have no result. Following a suggestion from one of the tech forums, I set up the following calculation:

Case(

(AV_1a + AV_1b + AV_1c + AV_1d) = 0, 0,

(AV_1a + AV_1b + AV_1c + AV_1d) /

((not IsEmpty(AV_1a)) + (not IsEmpty(AV_1b))) + (not IsEmpty(AV_1c)))) + (not IsEmpty(AV_1d)))))

)

I just checked one average of 2 results (3.69 + 3.16). Instead of getting 3.43, the calulation is giving me 3.18. What am I doing wrong???

As far as I can tell, the calculation is correct. I would try breaking it out to see if each part is working correctly.

Create a calculation number field called perhaps "Divisor" and make it equal to ((not IsEmpty(AV_1a)) + (not IsEmpty(AV_1b))) + (not IsEmpty(AV_1c)))) + (not IsEmpty(AV_1d)). Make sure that for the record you mentioned, this field is equal to 2.

Create another calculation number field called "Total" and make it equal to (AV_1a + AV_1b + AV_1c + AV_1d) and make sure that for the record you mentioned, it is equal to 6.86.

If both of these test field work out to have the right values, try editing your original equation to equal Case(

Total = 0, 0,

Total / Divisor

)

Chuck

Create an account or sign in to comment

Important Information

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

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.