1 Reply Latest reply on May 21, 2015 7:31 AM by philmodjunk

    Perform calculations(sum) after quick find/search

    NamkitLee

      Title

      Perform calculations(sum) after quick find/search

      Post

      Recently, I am writing an invoice data base to record the sales of different products, I wish to perform a sum calculation after searching of a product to show the total sales($) from all the invoices of it. 

      for example, I have product A and B in my company, and I use invoice to keep record of how many and how much each product sold. so how can I look for the total sales($) of product A or B sold? 

      do i need a script? calculation? or anyways to achieve it?

      thx for your kindly help

        • 1. Re: Perform calculations(sum) after quick find/search
          philmodjunk

          Do you use the typical date model for Invoicing?

          Invoices---<LineItems (also called InvoiceData)>----Products

          If you use a portal to list the items on an invoice, then this is probably the set of relationships used in your system.

          If so, you'd use a find (or possibly Go TO Related records from a record in the products table) to find the desired records on a layout based on LineItems (This table is named InvoiceData in recent FileMaker starter solutions). A summary field defined in LineItems will then show you the needed total or totals.

          You may find this summary report tutorial--which happens to be based on just such a data model a useful source of reporting ideas:  Creating Filemaker Pro summary reports--Tutorial