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     Pulling data from 2 different tables to use in computation

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Pulling data from 2 different tables to use in computation
 Login/Join
 
Guru
posted
Hi all -

I'm not quite sure how to accomplish this.
I have a table of values by month. Simplified as:
PROJECT, RESOURCE, HOURS, MONTH
I also have another table of values, one entry per month as follows:
MONTH, FTEHRS
I need to write a report as follows:
(SUM HOURS/SUM FTEHRS) ACROSS RESOURCE BY PROJECT WHERE MONTH FALLS BETWEEN SOME FILTER CRITERIA.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Virtuoso
posted Hide Post
Do the tables have a key in common? You basically have the report process in pseudo code, but you need to have the tables joined some way or extract the data from each to two hold files and 'create a common key on both' then join the hold files.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
In the upper right portion of this screen, there is a reference to Search the Technical Documentation Library. You can look there for information regarding the JOIN and Match commands.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Guru
posted Hide Post
I can handle join just fine. But the thing is, the two tables are not supposed to join. I need to get the sum of all hours from table1 within the date range provided by the user (as & parms) for each project and resource within project. Then, sum all of the ftehrs from table2 within the date range. Then perform the computation between the two. So, here's sample data:
Table 1:
Month, Project, Resource, Hours
January, Project A, Leah, 80
January, Project A, Leah, 80
January, Project A, Jimster, 150 
January, Project B, Linda, 160
February, Project A, Anatess, 160
February, Project A, Leah, 118
February, Project B, Linda, 118


Now, Table 2:
Month, FTE
January, 160
February, 118
March, 160


Now, the report for date range January and February would be:
                Anatess   Jimster  Leah  Linda
Project A        0.57      0.53     1      
Project B                                  1


This is how the numbers are computed:
(Sum of hours from table1)/(Sum of ftehrs from table2)
Project A, Anatess = 0.57 = 160/(160+118)
Leah = 1 = (80+80+118)/(160+118)

So, do you see how it's not really a join? Does that make sense?


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Virtuoso
posted Hide Post
Generically

sum the project hours by month by project by person and hold the data, then in the month table pull the month and sort the FTE by month and hold in another file then join the tables by month and perform your calculations. I think second file to first will do as long as you do a join to all. If that overstates the ftehrs, try reversing the join.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
Okay, I figured it out.
What I did is this:
TABLE FILE TABLE2
SUM FTEHRS
WHERE PRDMTH GE '&STARTDTE' AND START_DATE LE '&ENDDTE';
ON TABLE SAVE
END
-RUN
-READ SAVE &FTE.I11
TABLE FILE TABLE1
SUM HOURS NOPRINT
    COMPUTE FTEEQ/D12.2 = SUM.HOURS / &FTE;
BY PROJECT
ACROSS RESOURCE
WHERE PRDMTH GE '&STARTDTE' AND START_DATE LE '&ENDDTE';
...ETC.


That works perfectly.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Virtuoso
posted Hide Post
Anatess

This can be done in a JOIN, very easily, by using the hours data first and JOINing to ALL:
JOIN MONTH IN months TO ALL MONTH IN project
TABLE FILE months
SUM months.HOURS NOPRINT
SUM 
COMPUTE RATIO/F8.2 = project.HOURS/C1;
ACROSS RESOURCE
BY PROJECT
WHERE PRDMTH GE '&STARTDTE' AND START_DATE LE '&ENDDTE';
END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 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     Pulling data from 2 different tables to use in computation

Copyright © 1996-2020 Information Builders