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] Weighted Averages at the Sub Total level

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Weighted Averages at the Sub Total level
 Login/Join
 
Member
posted
Looking to do a Weighted Average at a sub group level. Searched the forum and see there are many suggestions to use RECAP and SUBFOOT. I have worked through some basic examples but now have my self in a knot with the real-life code and business report.

In short, I am creating a report that groups data by Machine, the Product being produced and reports the machine run Duration and target speed.
Then for each machine summarize the individual data, report the total run Duration and the Weighted Target Speed based on the run Duration for each Product by Machine.

Below is an example of what I am try to code.
'Machine' and 'Product' are 'BY' fields. 'Duration' and 'Target_Speed' are Aggregate fields.
The report needs to summarized data by 'Work Center'.


Machine Product Duration Target_Speed
1 A 100 1700
B 300 2000
Machine Totals: 1 400 1925 (Weighted Tgt Speed)


2 c 100 2000
D 200 1500
E 400 1000
Machine Totals: 2 700 1270 (Weighted Tgt Speed)

I have tried RECAP and SUBFOOT but calculates duration totals for the entire report (i.e. 1100) and applies that value to each machine.
I need to get the total duration for each machine and the 'Weighted Target Speed; based on the duration factor and target speed for the products produced on each specific machine.

Any suggestions or examples would be appreciated? Thanks.

This message has been edited. Last edited by: Dave H.,


WebFOCUS 8.009
Windows, All Outputs
 
Posts: 13 | Registered: January 15, 2014Report This Post
Virtuoso
posted Hide Post
This should do it:
  
TABLE ...
BY MACHINE
BY PRODUCT
PRINT DURATION TARGET_SPEED 
COMPUTE PTDS/D6c=DURATION * TARGET_SPEED; NOPRINT
ON MACHINE RECAP WTS/D6c=PTDS / DURATION;
ON MACHINE SUBFOOT
"<WTS " 


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report 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] Weighted Averages at the Sub Total level

Copyright © 1996-2020 Information Builders