Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

help needed again on Sub Total Report

Dear all, I have created sub total in my report by introducing group headers (Grouped by Reason Code).

Everything is fine however, the places where I have used formulas to calculate averages, the sub totals are getting cumulative.

For example

Reason Code - Description - Jobs - Lenses - Averages
01
02
03
45
50
60
89
99

Sub Total ---                  12        xx       xx          8

100
123
134
159
187
199                                                                 
Sub total          xxxxx    30        xx                    85

In the above example the range 100 - 199 has total of 77 not 85. The formula I am using calculates the average sub totals in cumulative manner.

Formula I am using to calculate the sub total for averages is

whileprintingrecords;
Numbervar FAvg;

Please note: FAvg is declared in my formula to calculate the averages and to get total sum I used the above formula under Group footer.

How can I re-use this formula so that it only counts the total averages from within that group order specified?

Many thanks

Regards

Jehanzeb

Former Member
replied

Hi Jehanzeb Navid,

In order to get rid of cummulative sum you need to reset the value in each group header like

whileprintingrecords;
Numbervar FAvg:=0;

Regards,

Raghavendra

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question