Jump to content

Multi-criteria Sum


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

Recommended Posts

I thought I figured this out, but actually I didn't. It could be quite simple.

I'm trying to have 2 criterias for my sum. (Category, Type)

I have a Sum d/b.

CategoryField= (Meat, Veggie, Milk, Carbo)

TotalCost_Expensive Field

TotalCost_Medium Field

TotalCost_Cheap Field

Portal Window(Everything d/:

In another d/b, called Everything d/b, I have a list of everything (This is a related file by CategoryField.)

CategoryField

TypeField = (Expensive, Medium, Cheap)

(The Type field applies to Meat, Veggie..etc)

CostField

Product

----------------------

Example:

*Sum d/b. Form 1.

Category: Meat

Portal row1: Product=Chicken; Type=Expensive; Cost=$500

Portal row2: Product= Pork; Type= Cheap; Cost = $200

Portal row3: Product= Beef; Type=Medium; Cost = $400

Portal row4: Product= Shrimp; Type=Expensive; Cost= $600

Total_Expensive = $1100

Total_Medium = $400

Total_Cheap =$200

*In Everything d/b:

Record 1: Meat, Chicken, Expensive, $500

Record 2: Meat, Pork, Cheap, $200

Record 3: Meat, Beef, Medium, $400

Record 4: Meat, Shrimp, Expensive, $600

Record 5: Veggie, Carrots, Expensive, $1000

-----------

I need to automatically calculate the

Total_Expensive, Total_Medium, Total_Cheap FOR that Category (Meat in this example) and to exclude Other Food Categories.

Total_Expensive = $1100, and not $2000.

Help!

Thanks!

Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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