Skip to Content
author's profile photo Former Member
Former Member

Formula - Sum of Multiple Group Header data


I'm looking to create a formula in Group 1 Footer that sums data from the Group 3 Header and Group 4 Header. I've done variations of this, but always in some way a Sum of a Sum, where the Header level is already in the picklist.

Having a devil of a time getting the syntax right.

Right now I have:

sum({Header 3},{Field}) + sum({Header 4},{Field})

What am I doing wrong? How specifically does Header 3 need to be referenced?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Mar 19, 2014 at 04:39 PM

    Hi Matthew,

    Do you have already have a Sum on the Group Headers 3 and 4? Are you trying to add these two figures and show the result on Group Footer 1?

    If yes, then try this:

    1) Create a formula with the code below and place this on the Group Footer #3:


    numbervar gr3;

    gr3 := gr3 + Sum({measure_field}, {group_field_3})

    2) Create another formula and place this on the Group Footer #4:


    numbervar gr4;

    gr4 := gr4 + Sum({measure_field}, {group_field_4})

    3) Create this formula to display the results on Group Footer 1:


    numbervar gr4;

    numbervar gr3;

    gr3 + gr4

    4) One last formula to reset the variables and this goes on the Group Header #1:


    numbervar gr4 := 0;

    numbervar gr3 := 0;

    Hope this helps.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Abhilash Kumar

      Definitely, thank you.

      As I was exploring, I remembered that, but it was still driving me a little nuts that I couldn't get the syntax right. I have about 200 reports that I've created over the last two and a half years, and I know I have a few examples, but I wasn't looking forward to scanning through them all. Our hardware support team wiped dates off of all these files what the migrated to a new server, which made it even more daunting. Didn't even think field,group, I was trying all variations of group,field.

      Thank you for your help, Abhilash, and your patience.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.