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     Cumulative YTD Average Column

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Cumulative YTD Average Column
 Login/Join
 
Member
posted
I'm trying to add a year-to-date average column to a report. So, the average needs to be cumulative with each successive month. Does anyone know how this can be acheived?


WebFOCUS 7.6.8
MS Windows XP
 
Posts: 15 | Location: Minneapolis | Registered: February 29, 2008Report This Post
Virtuoso
posted Hide Post
See if this helps. If not do a search on the forum of Cumulative Average and there are more posts


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
You can build the 'McGuyver' file from a hold file of measure values by time period.
-* ytd_avg.fex
JOIN CLEAR
TABLE FILE IBISAMP/CASHFLOW
SUM COMPUTE NADA/A1=; NOPRINT
  BY TOTAL NADA
SUM
  LONG_TERM_DEBT AS LTD2
  BY TOTAL NADA
  BY MONTH AS MONTH2
ON TABLE SET ASNAMES ON AND HOLDLIST PRINTONLY
ON TABLE HOLD AS LTD2 FORMAT FOCUS INDEX NADA
END

TABLE FILE LTD2
  WRITE LTD2 AS LTD
  MONTH2 NOPRINT
  COMPUTE YEAR/YY=MONTH2;
  COMPUTE JAN/MYY=YEAR;
  BY NADA
  BY MONTH2 AS MONTH
ON TABLE SET ASNAMES ON AND HOLDLIST PRINTONLY
ON TABLE HOLD AS LTD1
END

JOIN NADA IN LTD1 TO NADA IN LTD2 AS J1:
TABLE FILE LTD1
WRITE LTD      AS MONTH,L.T.D.
      SUM.LTD2 AS YTD,L.T.D
	  AVE.LTD2 AS AVG,L.T.D.
-*    COMPUTE MONTHS/I2 = MONTH + 1 - JAN; 
-*            AVERAGE/D10=SUM.LTD2/MONTHS;
BY YEAR UNDER-LINE
BY MONTH
WHERE MONTH2 GE JAN;
WHERE MONTH2 LE MONTH;
END


The Hold files LTD1 and 2 contains identical lists of months and monthly measures (so that we can report the month's figures and the YTD average). LTD1 supplies the time-axis points in the graph, and the join to LTD2 allows the report to sum, count and average the measure over the respecive series of months to date for each respective axis point. (In principle, you could join LTD2 to itself)

If the measure may be missing for some months, rather than using AVE. you should compute the running average explicitly, as in the commented lines.

- Jack Gross
WF 7.6.5, Win


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Can you post an example of what you are thinking of?
It might make it easier to understand what you want and to advice you.
If you post it, put it between the proper codes..
  [CODE]  
[/CODE]




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
Member
posted Hide Post
Thanks. I think I'm on my way to figuring it out. I had actually looked at that thread before, only I didn't realize I had to use Compute for the Last function to work. I'll try it again.


WebFOCUS 7.6.8
MS Windows XP
 
Posts: 15 | Location: Minneapolis | Registered: February 29, 2008Report 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     Cumulative YTD Average Column

Copyright © 1996-2020 Information Builders