As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. New TIBCO Community Coming Soon In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch. What You Need to Know about Our New Community We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion. During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.
Focal Point    Focal Point Forums    WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] ROW-TOTAL PERCENT PROBLEM GGSALES

 Go Search Notify Tools
 [CLOSED] ROW-TOTAL PERCENT PROBLEM GGSALES
Silver Member
 posted August 25, 2011 11:59 AM
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
"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,

 Posts: 35 | Location: DFW Texas | Registered: May 30, 2008 IP
Silver Member
 posted August 25, 2011 12:27 PM Hide Post
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,

 Posts: 35 | Location: DFW Texas | Registered: May 30, 2008 IP
Expert
 posted September 07, 2011 01:48 PM Hide Post
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.

 Posts: 1948 | Location: New York | Registered: November 16, 2004 IP
Expert
 posted September 08, 2011 10:35 AM Hide Post
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.

 Posts: 1948 | Location: New York | Registered: November 16, 2004 IP
Gold member
 posted September 08, 2011 02:21 PM Hide Post
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
"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

 Posts: 75 | Location: Dallas, TX | Registered: February 12, 2004 IP
Silver Member
 posted September 20, 2011 04:35 PM Hide Post
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,

 Posts: 35 | Location: DFW Texas | Registered: May 30, 2008 IP