NEWHERE Posted July 18, 2005 Posted July 18, 2005 I have the Invoice table and the Invoice 2 table as self-join. I created a portal using the Invoice 2. There's the Category, Item, Qty, Price and Amount fields. I can do the Total field which calculates the sum of the Amount field of the portal. But I can't figure out how to just total the amount of only those of a paticular category. For instance, the total amount of only with Category = "Electronics". Please help.
RalphL Posted July 18, 2005 Posted July 18, 2005 You didn't tell us what you are using in your relationship between TO Invoice and TO Invoice 2. Add a global field gCategory. Relate that in TO Invoice to Category In TO Invoice 2. Now you will see all item of that category. Use the Sum function to get the total, Sum (Invoice2::Amount.
NEWHERE Posted July 19, 2005 Author Posted July 19, 2005 Thanks, Ralph. This is a db of customer invoices and billing that I am trying to do. I am using a customer id field as match field between Invoice and Invoice 2. Yes, your suggestion did exactly what I wanted to happen. However, the Total field also changed. I want the Total field to indicate the sum of the Amount field (of all Categories for a particular customer or record), then I want to show a breakdown of that Total. For example, TotalElectronics for the total amount of only those Category = Electronics, etc. I want all this to show in one layout. Any suggestions?
RalphL Posted July 19, 2005 Posted July 19, 2005 You will need another TO Invoice 3 with just the customer id as the match or key field. Use the sum function with this relationship.
Recommended Posts
This topic is 7135 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