susnhine92122 Posted September 13, 2006 Share Posted September 13, 2006 I have a file that I use to manage purchase orders. I want to have a field that calculates the total quantity of a certain product. ie on an order that has 3 different items I need a total quantity count on only the items that have the item# 13063. I'm sure this is easily done, but I am not very conversant with calculations unless they are very simple. Any help I could get would be greatly appreciated. Link to comment Share on other sites More sharing options...
BobWeaver Posted September 17, 2006 Share Posted September 17, 2006 Is it always going to be that specific item number? If so, you can create a second line item relationship (call it "LineItem13063") with the same criteria as your existing relationship, plus the added condition that item# = 13063, and then use the count function. Count(LineItem13063::AnyField) Link to comment Share on other sites More sharing options...
susnhine92122 Posted September 18, 2006 Author Share Posted September 18, 2006 No there are about 5 different item numbers that this will apply to Link to comment Share on other sites More sharing options...
BobWeaver Posted September 19, 2006 Share Posted September 19, 2006 That's a small enough number that you could build a relationship for each one. Link to comment Share on other sites More sharing options...
Newbies fmpwizard Posted September 19, 2006 Newbies Share Posted September 19, 2006 Similar to the previous solution. Define a global field on the main table, this field will have a value list with the 5 different item numbers. Then define a relationship from the main table to the line items using gItemNumber = lineitem_itemNumber And then the calc could be: Count ( g_ItemNumber::item_number ) Hope it helps! Everytime you select a different item number from the list you will get the count of how many orders have that particular item. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6557 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 accountSign in
Already have an account? Sign in here.
Sign In Now