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     Getting the percent of total columns

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Getting the percent of total columns
 Login/Join
 
Member
posted
I need some help getting the percentage of a column total.

Here is my code:

DEFINE FILE PROVIDERCLAIMFACT
RECPAY/D15.2=
IF
TRANSACTIONTYPECODE EQ 'P' OR 'A'
AND TRANSACTIONCATEGORYCODE NE 'CRA' OR 'DRA'
THEN TRANSACTIONAMT
ELSE 0;
RECIDEN/D15.2=
IF
( TRANSACTIONCODE EQ 'REFDUE' OR 'REC-REFDUE' )
OR ((TRANSACTIONCATEGORYCODE EQ 'DRA' OR 'CRA' ) AND ( TRANSACTIONCODE NE 'COR-CDEN' OR 'COR-PDEN' ))
THEN TRANSACTIONAMT
ELSE 0;
END
TABLE FILE PROVIDERCLAIMFACT
SUM
RECIDEN AS 'Identified Dollars'
BY YEARMONTHKEY AS 'Rec Iden Month'
SUM
RECPAY AS 'Recovery Pmt'
BY YEARMONTHKEY AS 'Rec Iden Month'
ACROSS HIGHEST YMKEY NOPRINT
ACROSS-TOTAL
ACROSS MONTHDES AS 'MONTH'
WHERE FULLDATE GE DT(&BeginDate);
WHERE FULLDATE LE DT(&EndDate);
WHERE REGIONKEY EQ ®IONKEY.(OR(FIND REGIONKEY IN VWERPTGEOGRAPHY)).Region.;
WHERE SERVICETYPEKEY EQ &SERVICEkey.(FIND SERVICETYPEKEY IN VWERPTGEOGRAPHY).SERVICEkey.;
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL' RECIDEN RECPAY


The output would looks something similar to this

July June
RECIDEN RECPAY RECPAY
200601 10 1 2
200602 10 1 2
200603 10 1 2

TOTAL: 30 3 6
What I want to do is get a percentage from total row; for example

Percentage: 10% (3/30) 20%(6/30)
Does anybody know of a way to do this? Note: I only need to display the percentage.


Any help is greatly appreciated!


Dev 7.1.4 WinNT SQL Server 2005 DB
Prod 7.1.4 WinNT SQL Server 2000 DB
 
Posts: 24 | Location: Nashville TN | Registered: May 18, 2006Report This Post
Virtuoso
posted Hide Post
first you have to creat a percentage like
COMPUTE SHRINK/D8.2% = ((OS/SALES ) * 100)

Then you can do
ON TABLE RECOMPUTE

to get a total on percent...if I'm understanding your question.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
Further to Prarie's comment, check this post:

Weighted Averages

Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Platinum Member
posted Hide Post
The way to do a total column calculation is with the RECAP function formated inside of SUBFOOT. eg.

TABLE FILE CAR
SUM SEATS AND AVE.SEATS
BY COUNTRY
ON TABLE RECAP
SEATRATIO= AVE.SEATS/SEATS ;
ON TABLE SUBFOOT
"MY VALUES ARE <SEATS  <AVE.SEATS  <SEATRATIO "
END

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


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Report 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     Getting the percent of total columns

Copyright © 1996-2020 Information Builders