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     needs a moving average in ACROSS report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
needs a moving average in ACROSS report
 Login/Join
 
Gold member
posted
I'm having a hard time using the FORECAST function with 'MOVAVE' in an ACROSS report.

To make it easy, my report shows amounts by Month across Account Groups and across Fiscal Years for 12 months and 2 fiscal years (actual and previous).

Ex:

.......Key Accnt......Retail Accnt......
.....2004....2005.....2004....2005......
...Amt.Ave..Amt.Ave..Amt.Ave..Amt.Ave
JUN.12..12..10..10...20..20...16..13
JUL.20..16..20..15...10..15...20..18
AUG.10..14..15..15...13..11....0..12
...
MAY

You get the picture. The Ave column is a moving average, means that its an average recalculated on each row based on shown records.

My code looks like:

TABLE FILE DOLPD
SUM
AMOUNT
COMPUTE MOVAVE/D18.2 = ; AS 'AVE'
BY
MONTH
ON MONTH RECAP MOVAVE/D18.2 = FORECAST(AMOUNT,1,0,'MOVAVE',12);
ACROSS ACCOUNT
ACROSS HIGHEST YEAR
END

When I run this, the result I see in the AVE column is definitely wrong. Is there a problem to use the FORECAST when you have ACROSS columns in your Report? It looks like it's not refering to the right values. I've also tried to calculate the moving average myself with:

COMPUTE CNT/I11 = CNT + 1;

COMPUTE TOTAMOUNT/D18.2 = IF (ACCOUNT EQ LAST ACCOUNT) AND (YEAR EQ LAST YEAR)
THEN TOTAMOUNT + AMOUNT ELSE AMOUNT;

COMPUTE MOVINGAVE/D18.2 = TOTAMOUNT / CNT;

The result is still not good, TOTAMOUNT is not a running total for AMOUNT!!

Please help!

p.s. I'm using 5.2.5
 
Posts: 87 | Location: Montreal, QC, Canada | Registered: September 03, 2004Report This Post
Virtuoso
posted Hide Post
Why not do your second option there without the across, and put it to a hold file. Then report the across from the hold file. Wouldn't that give you the desired results?
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Gold member
posted Hide Post
Thanks, I forgot to come back to see the answers but that is exactly what I did. I just wanted to know if there is a known bug with ACROSS report using those moving averages...

Hold file is the solution, I'm now calculating my own moving average with all BY fields in a hold file and then reading it and showing it as my ACROSS report.
 
Posts: 87 | Location: Montreal, QC, Canada | Registered: September 03, 2004Report 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     needs a moving average in ACROSS report

Copyright © 1996-2020 Information Builders