Focal Point Banner


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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     SOLUTION: Using SUBTOTAL and RECOMPUTE with ACROSS in same report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SOLUTION: Using SUBTOTAL and RECOMPUTE with ACROSS in same report
 Login/Join
 
Gold member
posted
I thought I would post a solution I found on another post within Focal Point.
My goal was to SUBTOTAL one computed field and print fields and RECOMPUTE other computed fields. Here is what I did:
First step to create a higher level total to compute in next step:

SET SUMMARY = EXPLICIT
-*
TABLE FILE LDS
SUM
COMPUTE LEAD_CNTR_TOT/I8=LEAD_CNTR;
BY LEAD_CTL
BY CAMP_DESC
SUM
LEAD_CNTR
CUST_RESP
BY LEAD_CTL
BY CAMP_DESC
BY CONTACT_TYP
ON TABLE HOLD AS SUMM
END
Next step, create the report:
TABLE FILE SUMM
COMPUTE PERCENT_TOT_LEAD/D12.2% = ( LEAD_CNTR / LEAD_CNTR_TOT ) * 100;
LEAD_CNTR/I8C
CUST_RESP/I8C
COMPUTE APP_RATE/D12.2% = ( CUST_RESP / LEAD_CNTR ) * 100;
BY HIGHEST LEAD_CTL NOPRINT
BY CONTACT_TYP
ACROSS CAMP_DESC AS ' ' RECOMPUTE
ACROSS-TOTAL AS 'Grand Totals'
ON LEAD_CTL RECOMPUTE APP_RATE AS 'Totals for'
ON LEAD_CTL SUBTOTAL PERCENT_TOT_LEAD LEAD_CNTR CUST_RESP
ON TABLE PCHOLD FORMAT EXL2K
END

The key here was to total my column PERCENT_TOT_LEAD, yet RECOMPUTE ACROSS. So I could not DEFINE column PERCENT_TOT_LEAD. That would total the column but also total across. The solution is simply this:
SET SUMMARY = EXPLICIT
then
ON sortfield RECOMPUTE FIELD1 (this is to recompute your computes)
ON sortfield SUBTOTAL FIELD2 FIELD3... (this is to total your print fields and total any specific computes)

then use ACROSS ... RECOMPUTE for everything

Here is the original post I found that may be useful.
http://forums.informationbuild...131000441#9131000441

BobV


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Expert
posted Hide Post
Thank you Bob for sharing the solution with all, good job!! Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     SOLUTION: Using SUBTOTAL and RECOMPUTE with ACROSS in same report

Copyright © 1996-2020 Information Builders