dbTalk Databases Forums  

Sum(field) BUT how can i exclude a part of the field?

comp.databases.filemaker comp.databases.filemaker


Discuss Sum(field) BUT how can i exclude a part of the field? in the comp.databases.filemaker forum.



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

Default Sum(field) BUT how can i exclude a part of the field? - 10-16-2009 , 02:35 PM






i have an estimate_line_items and i have put some fields( product id,
product name, product_unit etc).My products tab includes both
services and products but the services are considered as products
( there is a category that separates the material-products from the
services).
What i am trying to do is to calculate the sum from the product_unit
field from the estimate_line_items( portal) EXCLUDING the number of
services which is also appeared on the field. Thus, i want the sum
that will appeared to give me only the sum of the material-products
and not the services!

i am fucking confused and i cannot find a solution...
any ideas????????

Reply With Quote
  #2  
Old   
Your Name
 
Posts: n/a

Default Re: Sum(field) BUT how can i exclude a part of the field? - 10-16-2009 , 05:05 PM






"vaggelis" <pantidos (AT) gmail (DOT) com> wrote

Quote:
i have an estimate_line_items and i have put some fields( product id,
product name, product_unit etc).My products tab includes both
services and products but the services are considered as products
( there is a category that separates the material-products from the
services).
What i am trying to do is to calculate the sum from the product_unit
field from the estimate_line_items( portal) EXCLUDING the number of
services which is also appeared on the field. Thus, i want the sum
that will appeared to give me only the sum of the material-products
and not the services!

i am {BEEP} confused and i cannot find a solution...
any ideas????????
Create a new Calculation Field, in same Table as the product_unit Field,
which uses an If statement to distinguish between a "service" and a
"material".
e.g. something like:
material_unit Calculation, Number Result, Unstored
= If (product="service"; 0 ; product_unit)

Then you can use this Field to sum the portal records instead of the
product_unit Field.
i.e.
sum_portal_material Calculation, Number Result, Unstored
= Sum(Relationship::material_unit)


Helpfull Harry )

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.