2 Replies Latest reply on May 31, 2016 11:02 PM by laguna92651

    Using different sort field with Getsummary function


      I am running a sub-summary baseball hitting statistics report, that is using the getsummary function to calculate the on going YTD batting ave, BA, for the season. The break field for the getsummary is the Player_ID.


      When I sort the report by Player_ID all works great, I get the calculated YTD batting average, BA, in the player's leading part summary as one would expect.


      I would like to be able to sort players sub-summary by the YTD player batting average, decending, haven't been able to make that work and keep

      the getsummary calculation working.

      BA stats.png


      In case it makes a difference, the game detail under each player is also on  sub-summary part, faux body part, instead of a body part. This was so I hide or show this game detail with a checkbox.

        • 1. Re: Using different sort field with Getsummary function

          Hi.  You could make summary fields eg. Total of Hits, Total of AB.  NB - not calculation fields using GetSummary function.  Then a calc using those summary fields (TotalofHits divided by TotalofAB) to give your batting average.  Throw those three fields into your subsummary part and it should work.  Remember that when you change your sorting you also need to change the sub-summary part so that it is based on the same sort field.


          HTH.  Chris

          • 2. Re: Using different sort field with Getsummary function

            I am missing something. I created a calculation field, sumCalc_BA, that uses the Summary fields, Tot Hits & Tot of AB, with the calculation, Tot Hits / Tot of AB. I am sorting the layout on sumCalc_AB and set the sub-summary part definition to show the sub-summary, when the sort is sumCalc_BA. I only get the first sub-summary with an incorrect sumCalc_BA. It seems like it should be straight forward, I think I tried this approach before I used a getsummary function, with a similar result, any thoughts.