# formulas

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

## Recommended Posts

• Newbies

I have a question regarding creating a formula. I need to create an average formula in one field D. It needs to accommodate the following conditions:

If there is a score in field A, field B and Field C then divide the sum of these three by 3

If there is a score in field A and field B then divide the sum of these by 2

If there is a score in Field B and C then divide the sum of these by 2

If there is a score in Field A and C then divide the sum of these by 2

If there is a score in field A then divide by 1

If there is a score in Field B then divide by 1

If there is a score in Field C then divide by 1

Thank you to anyone out there who can help me with this problem.

##### Share on other sites

Sounds like another job for a Case Statement :-)

This should accomplish what you're trying to do...

Case(

not IsEmpty(Test A) and not IsEmpty(Test : and not IsEmpty(Test C), (Test A + Test B + Test C) / 3,

not IsEmpty(Test A) and not IsEmpty(Test and IsEmpty(Test C), (Test A + Test / 2,

not IsEmpty(Test A) and IsEmpty(Test and not IsEmpty(Test C), (Test A + Test C) / 2,

IsEmpty(Test A) and not IsEmpty(Test and not IsEmpty(Test C), (Test B + Test C) / 2,

not IsEmpty(Test A) and IsEmpty(Test and IsEmpty(Test C), Test A / 1,

IsEmpty(Test A) and not IsEmpty(Test and IsEmpty(Test C), Test B / 1,

IsEmpty(Test A) and IsEmpty(Test and not IsEmpty(Test C), Test C / 1, 0)

Later,

Paul :-)

##### Share on other sites

Or you can create a calc field (call it "Fields"):

If(isEmpty (A), 1, 0) + If(isEmpty (, 1, 0) + If(isEmpty ©, 1, 0).

(A+B+C)/Fields

HTH,

Dan

##### Share on other sites

Wups!

That "Fields" calc should be:

If(isEmpty (A), 0, 1) + If(isEmpty (:, 0, 1) + If(isEmpty ©, 0, 1)

Whew!

##### Share on other sites

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

## Create an account

Register a new account

• ### Similar Content

• #### Filemaker 6 for Mac issue.

By Tumma K,

• (and 4 more)

Tagged with:

• 8 replies
• 4,479 views
• #### FM3 upgrade to FM Pro 5.5 - Windows 8 installation possible?

By MrEddByrnes,

• (and 4 more)

Tagged with:

• 5,263 views
• #### Moving data from fp5 to fp13

By bmill,

• (and 4 more)

Tagged with:

• 2 replies
• 3,497 views
• #### Filemaker 5.5 database will not delete records on-line

By randyinla,

• (and 4 more)

Tagged with:

• 3,113 views
• #### Are there still hosting providers for filemaker 5.5?

By randyinla,

• (and 4 more)

Tagged with:

• 2 replies
• 2,739 views
×
×
• Create New...