7 Replies Latest reply on May 12, 2015 9:48 AM by MT_2

    Totals in a Sub Summary Part



      Totals in a Sub Summary Part




      I have two fields 

      A. "Total of LeadsReceived" &

      B "Total of LeadsUnderCriteria"

      I have a third field

      C "QualifyingLeads" which should work out A-B as such but when I put the third C in the Sub Summary I get the total for the whole layout rather than the section it should be totalling. I have sorted the layout by the right fields I believe to get the Totals for the sub summary but I still get the total in filed C for the whole layout and then this value repeats in the sub summary part in all the following sections.

      Any help would be appreciated 



        • 1. Re: Totals in a Sub Summary Part

          The value returned by a summary field depends on the context in which it is used. When used in a calculation, the value returned is a "grand total" value based on the current found set. In order to access the sub summary layout part based sub-total, use the getSummary function and specify the same field specified as the "sorted by" field for the sub summary part as the "break field" parameter in the sub summary function call.

          One small but important difference between GetSummary and sub summary layout parts is that getsummary requires that the summary field, the break field and the calculation field using getSummary all be defined in the same table. (The "sorted by" field in a sub summary layout part can, on the other hand, be from a related table.)

          • 2. Re: Totals in a Sub Summary Part

            Thank you,

            I will look at that now.

            Many Thanks 

            • 3. Re: Totals in a Sub Summary Part

              Hi Phil,

              I am trying to do what you replied but could you check if this appears correct to you...

              GetSummary (TotalCountQualifying Lead;CountQualifyingLeads)/GetSummary(TotalCountOnCoverLeads A;Count of On Cover A)

              • 4. Re: Totals in a Sub Summary Part

                The break fields look wrong to me. I don't imagine that you are actually sorting records on CountQualifyingLeads and Count of On Cover A but I'm just going by the field names here. In place of those two fields, you need the "sorted by" fields from the corresponding sub summary layout parts where you see the sub totals that you want to use in the calculation.

                • 5. Re: Totals in a Sub Summary Part



                  I only have only one Sub Summary area as I only want one line per advisor, this is set to as sorted by "Advisor" field

                  However as I am getting totals for many things in that Sub Summary area so I am sorting by many other fields to get my results

                  Advisor - Client ID - CountQualifyingLeads - CountLeadsReceived - CountOnCover plus others

                  I am now trying to get the conversion rate between TotalLeadsQualified and TotalOnCover

                  The Two fields when in the sub summary give me the correct results but I can not seem to get the conversion rate to do the same.

                  To get the right counts I am using the Sum the reciprocal approach you showed me in a previous approach.

                  • 6. Re: Totals in a Sub Summary Part

                    Then "Advisor" is the field that should be specified as the "break" field in the two getsummary function calls.

                    • 7. Re: Totals in a Sub Summary Part



                      Thanks for all your help I have managed to get the result now.