Focal Point
[Solved] Simple Avg and sum totals on same total line?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9547070776

July 03, 2015, 09:41 AM
JOE
[Solved] Simple Avg and sum totals on same total line?
I've search the forum and couldn't find anything which will allow me to have avgs and totals on same total line. Is this possible?
Thanks..sample code
TABLE FILE SQLOUT
SUM 
     UnplannedAbs
     FT
     PT
BY  LOWEST FirstDayWeek NOPRINT 
BY  LOWEST IMPORT_DATE NOPRINT 
BY  Month_Year
BY  DayName
BY  DayNo
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SUMMARIZE UnplannedAbs FT PT AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=REPORT,
     COLUMN=N3,
     WRAP=6.000000,
$
ENDSTYLE
END  

This message has been edited. Last edited by: JOE,


WebFocus 7.7.02 WinXP
July 03, 2015, 04:48 PM
George Patton
If I understand your question correctly all you have to do is define a new field equal to the one you are totalling on and use that one for the average. When you use SUMMARIZE the totals will be in one column and the average for the field will be in another.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
July 06, 2015, 11:38 AM
JOE
We found a fix. You can have ave and sum in same summarize line however; you need to add a space after the prefix

 ON TABLE SUMMARIZE AVE. FT PT TotHeads FTE SUM. SCH_Hour Tardy NoContact Term..ect



WebFocus 7.7.02 WinXP