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 to calculate a cumulative percent?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to calculate a cumulative percent?
 Login/Join
 
Platinum Member
posted
Hello,
I need to create a graph with a cumulative percent.
Based on what I read here http://wiki.answers.com/Q/How_..._cumulative_percent, I can create a temporary file that gives me the individual values and the percent.
But how can I add the percent value of the step before?

Thanks in advanced,
Carlos Dias

This message has been edited. Last edited by: Carlos Dias,


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Master
posted Hide Post
You can not.
That would be mathematically incorrect.

But you can:
TABLE FILE CAR
	SUM SALES DCOST
	COMPUTE PERC/D12.2% = ( DCOST / SALES ) * 100;
	COMPUTE CUME_SALES/D12 = CUME_SALES + SALES; NOPRINT
	COMPUTE CUME_DCOST/D12 = CUME_DCOST + DCOST; NOPRINT
	COMPUTE CUME_PERC/D12.2% = ( CUME_DCOST / CUME_SALES ) * 100;
BY CAR
END


So first make a CUME_ of the two components you need in you percentage.
Then calculate the cumulative percentages.

G'luck.
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
you can

just ad an extra compute

CUMUL_PCT=LAST CUMU_PCT+ PCT;




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
The solution posted by Dave solve my problem.

Thanks,
Carlos Dias


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Silver Member
posted Hide Post
Hi,

I found this great solution to my problem that Dave posted of running a cumulative column. However, the problem I have is that my report is BY Vendor So I will have several rows of records by Vendor and then the Vendor# changes and several more rows of records for that vendor, I need the Cumulative column to recalculate every time the The Vendor Number changes.

Vendor InvoiceAmt CumulativeAmt
ABC 100 100
ABC 200 300

XYZ 50 50
XYZ 200 250


I appreciate any help. Thanks.


WEBFOCUS 7.14
WEBFOCUS.8.04
 
Posts: 44 | Registered: March 30, 2007Report This Post
Master
posted Hide Post
Only logical for me to answer this :-)

TABLE FILE yourfile
SUM InvoiceAmt
    COMPUTE CumulativeAmt/D12 = IF LAST FST.Vendor EQ FST.Vendor THEN CumulativeAmt + InvoiceAmt ELSE InvoiceAmt;
BY Vender
END


You just have to make the Cumulative column smarter. It now checks wheter the Vendor of the LAST row of the internal matrix is the same as te one on the current row.
In your case you don't need the FST. because Vendor is alphanumeric. If Vendor is a number you will need to use FST. Because otherwise SUM Vendor will sum the Vendornumber and you won't be able to do the check.

G'luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Silver Member
posted Hide Post
Worked perfectlySmiler Thanks so much Dave!


WEBFOCUS 7.14
WEBFOCUS.8.04
 
Posts: 44 | Registered: March 30, 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     [SOLVED] How to calculate a cumulative percent?

Copyright © 1996-2020 Information Builders