5 Replies Latest reply on Sep 25, 2014 8:07 AM by philmodjunk

    Calculation to Count Fields

    SydneyBlock_1

      Title

      Calculation to Count Fields

      Post

      I am trying to create a field that will count the number of times a certain item type and it's status. For instance;

      Item Type                Status                        Count

      Spool                      On Site                         44

      Spool                      Missing                         20

       

      These fields are solely based off of one single table and no current relationships.

        • 1. Re: Calculation to Count Fields
          philmodjunk

          Does "44" indicate that you have 44 records with an Item Type of "Spool" and a Status of "On Site"?

          • 3. Re: Calculation to Count Fields
            philmodjunk

            Then your example can be created with a simple summary report.

            Define a "count of" summary field that "counts" some field in your database that is never empty.

            Create a layout based on this table where you add a sub summary layout part, but remove the body layout part.

            Set up the sub summary layout part so that it is "sorted by" the status field.

            Put the Item Type, Status and this newly defined summary field inside this sub summary layout part.

            This layout should be viewed in List View mode.

            When you return to Browse mode, your layout will appear blank. Sort your records by Item Type, then by Status to group your records by the values in those fields and then you'll get one row for each unique combination of Type and Status with a count of those records shown.

            For more on summary reports, see: Creating Filemaker Pro summary reports--Tutorial

            Caulkins Consulting, Home of Adventures In FileMaking

            • 4. Re: Calculation to Count Fields
              SydneyBlock_1

              I have it set up as this; there is also other fields that are primarily sorting the report.

              Area

                     System

                                        Package Number

                                                                     Item Type            Status                     Count

               

              "Area" is a Leading Sub-Summary when sorted by Area

              "System" is a Leading Sub-Summary when sorted System

              "Package Number" is a leading Sub-Summary when sorted by PackageNum

              "Item Type", "Status", & "Count" Are all fields within the Body.

              There is a Trailing Sub-Summary when sorted by System.

              There is a trailing Sub-Summary when sorted by Area.

              As well as a Trailing Grand Summary.

              The only issue with the report now is that the fields within the body are showing multiple duplicates. How to I get it to understand to group them?

              • 5. Re: Calculation to Count Fields
                philmodjunk

                To repeat, remove the body layout part and replace it with a sub summary layout part that contains the "Item Type", "Status", & "Count" fields.