Focal Point
[CLOSED] ROW-TOTAL PERCENT PROBLEM GGSALES

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

August 25, 2011, 11:59 AM
KenFR
[CLOSED] ROW-TOTAL PERCENT PROBLEM GGSALES
I'm having trouble getting the percentages right in the last column. I do need to keep the format basically the same but minor tweaks or major redo ideas welcome.

 DEFINE FILE GGORDER
ORDERCNT/I8=1;
 8_OZ/I8=IF SIZE EQ 8 THEN 1 ELSE 0;
 12_OZ/I8=IF SIZE EQ 12 THEN 1 ELSE 0;
 YEAR/YY=ORDER_DATE;
END
TABLE FILE GGORDER
HEADING
"percent of reports products that are 8oz"
"need percent to calc correctly in last row-total column"
SUM
  ORDERCNT/I8C
  8_OZ/I8C 
  12_OZ/I8C 
  COMPUTE PCT_8OZ/D8%=(8_OZ/ORDERCNT)*100;
BY YEAR
BY PACKAGE AS ''
BY PRODUCT_CODE AS 'Product' 
ACROSS PACKAGE_TYPE AS ''
ACROSS SIZE AS ''
WHERE SIZE GT 7 AND SIZE LT 20
-*WHERE PRODUCT_CODE EQ 'G$*'
ON PACKAGE RECOMPUTE AS '*subtotal'
ON SIZE RECOMPUTE AS '*TOTAL'
ON TABLE SET PAGE-NUM OFF
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

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


8105 Tomcat and AIX reporting server
input: Teradata, SQL, DB2, Essbase, Oracle, text
output:html, excel, PDF,
August 25, 2011, 12:27 PM
KenFR
Its back...The ACROSS field column totals appear to work, but the ROW-TOTAL (last columns) calc the percents wrong.

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


8105 Tomcat and AIX reporting server
input: Teradata, SQL, DB2, Essbase, Oracle, text
output:html, excel, PDF,
September 07, 2011, 01:48 PM
Kerry
Hi Ken,

I passed this to our experts and was suggested that we do not see the problem when running in 7702. If you need additional assistance, please open a case with Customer Support Services. You may either call at 1-800-736-6130, or access online at InfoResponse.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
September 08, 2011, 10:35 AM
Kerry
Hi Ken,

Some additional suggestion from our technicals may be of help: The code looks good but there should not be a ROW_TOTAL to calculate that value going across. That needs to be recomputed or another compute field needs to be set up to calculate that value. There use to be a SUMMARIZE command that would probable work here.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
September 08, 2011, 02:21 PM
Mary Watermann
KenFR,

I looked at your code and made a slight modification that might work for you:

  
 DEFINE FILE GGORDER
ORDERCNT/I8=1;
 8_OZ/I8=IF SIZE EQ 8 THEN 1 ELSE 0;
 12_OZ/I8=IF SIZE EQ 12 THEN 1 ELSE 0;
 YEAR/YY=ORDER_DATE;
 SP1/A1 = ' ';
END
TABLE FILE GGORDER
HEADING
"percent of reports products that are 8oz"
"need percent to calc correctly in last row-total column"
SUM
  ORDERCNT/I8C
  8_OZ/I8C 
  12_OZ/I8C 
  COMPUTE PCT_8OZ/D8%=(8_OZ/ORDERCNT)*100;
BY YEAR
BY PACKAGE AS ''
BY PRODUCT_CODE AS 'Product' 
ACROSS SP1          AS ''
ACROSS PACKAGE_TYPE AS ''
ACROSS SIZE         AS ''
WHERE SIZE GT 7 AND SIZE LT 20
-*WHERE PRODUCT_CODE EQ 'G$*'
ON PACKAGE RECOMPUTE AS '*subtotal'
ON SIZE RECOMPUTE AS '*TOTAL'
ON TABLE SET PAGE-NUM OFF
ON SP1 RECOMPUTE AS 'TOTAL'
-*ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END


Tried to bold the code added, but it is not working.

Added field SP1 (dummy blank field).


WF 7.6.10, Windows, PDF, Excel
September 20, 2011, 04:35 PM
KenFR
Mary,
Thanks a ton, that is a perfect solution


8105 Tomcat and AIX reporting server
input: Teradata, SQL, DB2, Essbase, Oracle, text
output:html, excel, PDF,