dbTalk Databases Forums  

Calculation Chaos...

comp.databases.filemaker comp.databases.filemaker


Discuss Calculation Chaos... in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
VoicesInMyHead
 
Posts: n/a

Default Calculation Chaos... - 08-02-2005 , 10:04 PM






....at least for me.

WinXP - FMP Dev 6.0v4

I have 11 fields - 5 fields in 2 columns with 2 Total fields.

The first colmn (items 1 thru 5) are a choice of A or B.
The second column is a sub total (number) based on choice A or B.

I am trying to have the Total fields calculate the numbers based on
the selection of A or B. Column 2 is a calculation and can be any
number.

1 (is A) 40.00
2 (is B) 03.25
3 (is B) 01.75
4 (is A) 30.00
5 (is A) 20.00

A Total 90.00
B Total 05.00

The problem is, that the A & B values change for each line item 1 thru
5 - depending on the person's selection and I do not know how to tell
the total fields to sum the line only if it matches it's value.

This is a single record calculation only - it will not include
multiple records.

I've been thru the newsgroup and even Scriptology... not sure what I
am missing.

Any help, tips, tricks or alcohol would be great! Thanks!

VoicesInMyHead

Reply With Quote
  #2  
Old   
Bill
 
Posts: n/a

Default Re: Calculation Chaos... - 08-02-2005 , 10:23 PM






In article <ru50f1plrhmkjgt6n6rfrg5ubdvdsda0ac (AT) 4ax (DOT) com>,
VoicesInMyHead <voices_inmyhead (AT) hotmail (DOT) com> wrote:

Quote:
...at least for me.

WinXP - FMP Dev 6.0v4

I have 11 fields - 5 fields in 2 columns with 2 Total fields.

The first colmn (items 1 thru 5) are a choice of A or B.
The second column is a sub total (number) based on choice A or B.

I am trying to have the Total fields calculate the numbers based on
the selection of A or B. Column 2 is a calculation and can be any
number.

1 (is A) 40.00
2 (is B) 03.25
3 (is B) 01.75
4 (is A) 30.00
5 (is A) 20.00

A Total 90.00
B Total 05.00

The problem is, that the A & B values change for each line item 1 thru
5 - depending on the person's selection and I do not know how to tell
the total fields to sum the line only if it matches it's value.

This is a single record calculation only - it will not include
multiple records.

I've been thru the newsgroup and even Scriptology... not sure what I
am missing.

Any help, tips, tricks or alcohol would be great! Thanks!

VoicesInMyHead
Here I call your two sets of fields
Set 1, Set 2, Set 3, Set 4, Set 5
Num 1, Num 2, Num 3, Num 4, Num 5

With the Set fields being text fields, to hold values "A" or "B", and
the Num fields being number fields holding numerical values.

Two calculation fields, which I call
A Total
B Total
defined as follows:

A Total = If(Set 1="A";Num 1;0)+If(Set 2="A";Num 2;0)+If(Set 3="A";Num
3;0)+If(Set 4="A";Num 4;0)+If(Set 5="A";Num 5;0)

B Total = If(Set 1="B";Num 1;0)+If(Set 2="B";Num 2;0)+If(Set 3="B";Num
3;0)+If(Set 4="B";Num 4;0)+If(Set 5="B";Num 5;0)

with Number results.

That will produce the result you want.

Bill Collins

--
For email, remove invalid.


Reply With Quote
  #3  
Old   
VoicesInMyHead
 
Posts: n/a

Default Re: Calculation Chaos... - 08-02-2005 , 11:27 PM



Bill,

Thanks man! Once I saw what you did, I hit myself with the big FMP
Bible! Thank you so much!

The Voices

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.