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     [CLOSED] Calculating PCT for a rowtotal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Calculating PCT for a rowtotal
 Login/Join
 
Silver Member
posted
Hi everybody, I hope you an happy new year. For me it will be a wel started year if I can have some help for this problem.
So, I would like to calculate the PCT.ROWTOTAL equivalence.
I'm in an across statement and i have to print de row-total and the row-total percent vs total report of this rowtotal

I tried this :
TABLE FILE TDWNFDLF
SUM
NB_ACV AS 'NB de Ventes'
ROW-TOTAL
PCT.ROW-TOTAL/D12.2%
BY LIB_OFF_AGG AS 'OFFRE AGR'
ACROSS SEMAINE2 AS ''
END

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


WebFocus thru Dev Studio version 7.6.11
Dev Studio on Windows Xp, Webfocus Client on UNIX basing on TOMCAT and DB2,
Reporting Server on MVS , USS and on UNIX
 
Posts: 39 | Location: France | Registered: December 10, 2007Report This Post
Virtuoso
posted Hide Post
Here is one approach using a multi-verb request:

TABLE FILE TDWNFDLF
SUM NB_ACV NOPRINT
BY LIB_OFF_AGG AS 'OFFRE AGR'
SUM NB_ACV AS 'NB de Ventes'
AND COMPUTE PCT_NB_ACV/D12.2% = NB_ACV/C1*100 ; AS '%'
BY LIB_OFF_AGG AS 'OFFRE AGR'
ACROSS SEMAINE2 AS ''
ON TABLE ROW-TOTAL
END


OR a simpler approach using verb prefix RPCT:

TABLE FILE TDWNFDLF
SUM NB_ACV AS 'NB de Ventes'
RPCT.NB_ACV/D12.2% AS '%
BY LIB_OFF_AGG AS 'OFFRE AGR'
ACROSS SEMAINE2 AS ''
ON TABLE ROW-TOTAL
END

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
Thank's Dan for your reply, but it's not exactely what I want.
At the end of the row I have to print first the row-total and then the PCT of this row-total vs the total of all row-total.
Is there one way to designate the row-total cell and his TOT. value.
Peharps it's not possible at all.


WebFocus thru Dev Studio version 7.6.11
Dev Studio on Windows Xp, Webfocus Client on UNIX basing on TOMCAT and DB2,
Reporting Server on MVS , USS and on UNIX
 
Posts: 39 | Location: France | Registered: December 10, 2007Report This Post
Virtuoso
posted Hide Post
I believe this code will generate the output you want, but the vertical positioning of the headings for the TOTALS and % columns may not be ideal.

TABLE FILE TDWNFDLF
 SUM NB_ACV NOPRINT
 SUM NB_ACV NOPRINT
  BY LIB_OFF_AGG AS 'OFFRE AGR'
 SUM NB_ACV AS 'NB de Ventes'
  BY LIB_OFF_AGG AS 'OFFRE AGR'
  ACROSS SEMAINE2 AS ''
  COMPUTE TOT_NB_ACV/D12.2 = C2 ; AS 'TOTALS'
  COMPUTE PCT_NB_ACV/D12.2% = C2/C1*100 ; AS '%'
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
I didn't try this on a report with an across but you may want to try this and see if it gives you what you want.... the WITHIN gives you percentages on each row as well as the percent on intermediate subtotals.

TABLE FILE TDWNFDLF
SUM
NB_ACV AS 'NB de Ventes'
ROW-TOTAL
PCT.ROW-TOTAL/D12.2% WITHIN LIB_OFF_AGG AS ''
BY LIB_OFF_AGG AS 'OFFRE AGR'
ACROSS SEMAINE2 AS ''
END


WebFOCUS 7.6.4
Windows XP against an Oracle Database mainly SCT Banner Higher Education ODS and EDW
Various output formats


Guy Brenckle
Budget Analyst
University of Northern Colorado
 
Posts: 25 | Location: Greeley Colorado | Registered: October 08, 2007Report 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     [CLOSED] Calculating PCT for a rowtotal

Copyright © 1996-2020 Information Builders