Adding Averages to the Stat Summary Footer - 3.4
Instructions for calculating averages for columns of a Statistics Summary Report template.
Print Friendly View
written: 03/28/2019
last modified: 02/13/2024

The Stat Summary report that comes with QC-CALC only displays columns for some statistical values, but there are times you want to see the average value for some of those columns. These directions will show you how to calculate and display the averages for the Average, Range, and Cpk columns.

The Report Designer

The directions shown here will add a Footer to the report and display some averages in that footer. This is a lengthy process, but relatively simple to accomplish.

  1. From QC-CALC Real-Time choose the Report > Design Template menu.

  1. Choose the StatSum.STT template from the list of files that appears and click Open. The Report Designer now appears on the screen.

Footer Lines

  1. Double-click on the table and the Table Contents window will appear.

  1. On the Footer Line tab, choose the Append line definition button that is circled in the picture above. On the next screen that appears, choose the “Line Definition 1” item from the “Data Line” area then click OK. This will make a copy of the Data Line and put it into the Footer area, which gives you the exact column widths to match the columns above.

  1. On the Footer Line tab, you will now see 2 separate line definitions. One is a blank line and the other is the copy of the Data Line area. In the “Line Definition 1 (1)” area, double-click on each element EXCEPT the ones you wish to show the averages for, and replace the calculations shown with “ “ (quote-space-quote). The picture below shows that most items were replaced, but the “Average”, “Range”, and “Cpk” elements remain.

  1. Click OK in the Table Contents window and save your changes (File > Save).

@Sum Variables

  1. The next thing that is needed is to create the @Sum variables that will be used to add together all of the items for each column. Go to the Project > Sum Variables menu and click the Insert a new variable button in the upper right corner.

  1. In the Create New Variable window that appears, enter a name that describes the contents of this variable. In this example, the Cpk column will be added up, so the “SumCpk” name is used.
  1. Next, click the Edit button so the calculation can be entered. In the Edit Sum Variable (@SumCpk) window that appears, choose “Cpk” from the “Fields” area in the Variables and Functions tab, then click the Insert button so it appears in the box at the bottom of the screen.

  1. Click OK to return to the Edit Sum Variables screen and follow steps 5 – 7 to create the “SumRange” (use the “Range” Field) and “SumAverage” (use the “Mean” Field) variables.
  1. The last thing to do in this area is to create another @Sum variable that will count the total number of rows (Characteristics) in the report. This will be divided into the other @Sum variables in order to get the Average of the Averages, Ranges, and Cpks.
  1. Click the Insert a new variable button and enter “TotalCharacteristics” as the name.
  1. Click the Edit button and enter a 1 in the bottom box (where the “Cpk” has the arrow pointing at it in the picture above).
  1. When all variables are added (see the picture below), click OK and save the changes to the template.

Footer Lines

  1. Now that the variables that contain the sum of the columns exist, those values need to be displayed in the Footer area of the table.
  2. Double-click on the table to bring up the Table Contents window again.
  3. Go to the Footer Line tab and double-click on the item that corresponds to the Average column. That value should look like this (before any changes):
if(Upper$(Char_Source)="P/F"," ",FStr$(Mean,"---&."+Rep$("#",Precision)))
  1. Delete anything that is shown in red above (don’t forget the end parenthesis too) so you are left with:


  1. Most of this line will remain as it is, but the “Mean” value is going to be changed to “@SumAverage/@TotalCharacteristics”. Ignore the “ERROR” being reported at the bottom of the screen. The fact that the report wasn’t actually processed is causing invalid values in the @Sum variables. This will work correctly when you run the report though. This should be the line when you’re done:


  1. Do the same basic step for the Range and Cpk lines. The lines should end up like this:
  1. Double-click on the 2nd item in the Line Definition we have been dealing with (this corresponds to the “Characteristic Label” column) and change the “ “ to “Averages” or whatever you would like to use to describe the values displayed in this footer.
  1. There is one last thing to do: On the Footer Line tab, choose the Append line definition button again. On the next screen that appears, choose the “Line Definition 1” item from the “Footer Line” area, then click OK.

  1. This will make a copy of the blank gray line that is already in the footer area, but both lines will currently appear before the Average line. To fix that, click on the “Line Definition 1 (2)” line that was just created, then click the down arrow button right below the Footer Line tab.

  1. Click the OK button on Table Contents window and save your changes to the template.
  1. When you run your report, you will now a new footer row that shows the average values that you wanted.


Applies To

QC-CALC Real-Time v.3.40
QC-CALC SPC v.3.40


Reporting - QC-CALC 3.x
See more articles in this category