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     [SOLVED] How can recalculate the percentages on the COLUMN Totals?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How can recalculate the percentages on the COLUMN Totals?
 Login/Join
 
Member
posted
Hi everybody. I'm creating a report with the percentages of the car sales by country, and I have two across dimensions: seats and body type. The column totals should be 100% for all the columns, and the across total must be recalculated with the percentages of the sales of the country over the total of the sales of the cars of the specific seats quantity. Now, the report is aggregating the percentages of the country, and it's displaying values greater than 100% on the across totals. How can I recalculate the percentages on the COLUMN-TOTALS? May you help me with that?

TABLE FILE CAR
SUM
'PCT.CAR.BODY.SALES/D7.2%' AS '%'
BY 'CAR.ORIGIN.COUNTRY'
ACROSS 'CAR.BODY.SEATS' AS ''
ACROSS 'CAR.BODY.BODYTYPE' AS '' ACROSS-TOTAL
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *

Thanks.

Regards, Francisco.

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


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 6 | Registered: May 26, 2010Report This Post
Virtuoso
posted Hide Post
ACROSS-TOTAL only performs summing, but you need a RECOMPUTE to recalculate the ACROSS percentages. Unfortunately, RECOMPUTE does not work on prefix operators like PCT (at least not with ACROSS), so you must COMPUTE the percentages in order for RECOMPUTE to work. See if the code below produces the desired results.

TABLE FILE CAR
 SUM
  COMPUTE PCT_SALES/D7.2% = SALES / TOT.SALES * 100 ; AS '%'
 BY COUNTRY
 ACROSS SEATS AS ''
 ACROSS BODYTYPE AS '' RECOMPUTE AS 'TOTAL'
 HEADING
  ""
 FOOTING
  ""
 ON TABLE SET PAGE-NUM OFF 
 ON TABLE COLUMN-TOTAL AS 'TOTAL'
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Yes! It worked. Thank you so much for your help.

Regards.


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 6 | Registered: May 26, 2010Report This Post
Member
posted Hide Post
I think that the Stack Measure option could solve my problem. I have been trying it and it seems that it does the functionality that I was searching.

Thanks.

Regards, Francisco.


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 6 | Registered: May 26, 2010Report 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     [SOLVED] How can recalculate the percentages on the COLUMN Totals?

Copyright © 1996-2020 Information Builders