I need help writing a calculation that is conditional. I have made a database for company bid prices on items and want to total up each company's bid separately. The one condition is I only want it to total up the items for each company that has been chosen for purchase. If the item has be chosen for purchase from a company it will have a "y" in a field next to the item and company. Any direction will help.
Thanks
Calculation Help
2 posts
• Page 1 of 1
|
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Well this is kind of abstract, but you can handle this at the price level or at the bid level. At the price level you'd have a new price field that is really a calc, something like:
if ( Chosen = "Y" ; Amount ; 0 ) Then summing this field will get you the total amount of the chosen items. At the bid level you could make a separate relationship between bids and items that was only true for chosen items; that means adding the "chosen" field to your relationship criteria somehow. Then you could have a sum calc in your bid that looks across this new relationship to sum the price of the chosen items: sum (chosenitems::amount) HTH. John Sindelar
SeedCode |
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests