6 Replies Latest reply on May 30, 2012 1:02 AM by Mitch

    Total for all records, not just found set



      Total for all records, not just found set


      I have a global summary field that is a total of a 'value' field for each record in my database.  When there is a search and resulting found set, the global summary is the total value of the records in the found set.

      Is there anyway way this global summary field can be set to show the total of value of ALL records in the database, regardles of the found set?

        • 1. Re: NoFields

          Probably there are several ways, but one way would be to make a Cartesan ('X') self-relationship to the table and use the calculation:

          = Sum ( SelfRelationship::ThatField )

          • 2. Re: NoFields

            That's a little bit over my head... and level of knowledge. 

            • 3. Re: NoFields

              Go to where you manage the tables and the relationship graph.  Create another copy (another Table Occurance) of the table with the data in it that you want to total.  Call it 'YourTable_SelfByConstant'.

              Create a realationship between YourTable and YourTable_SelfByConstant by choosing a field on the left and a field on the right and use the 'X' connector.  This will link all reaods in the table to all other records.

              Create a new calculation field:

              TotalOfAllRecords = Sum ( YourTable_SelfByConstant::TheDataFieldYouWantToTotal )

              • 4. Re: NoFields

                I assume it matters what fields you use to link between the two occurances?

                Also a global field?

                Depending on the settings for the field, I am either getting a "?" or the value for the Current Record....

                • 5. Re: NoFields

                  Not with a Cartesian Join.  Though I tend to play double-safe and use two conventional fields that I know will have data in them - KeyID fields, for example.

                  You don't need to make it a global field - it will have the same value for every record, anyway.  The question mark is sometimes because the field isn't large enough to display the number.  If you make the field very wide can you see it then?

                  • 6. Re: NoFields

                    Got it, thanks.