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     [Closed] Problem getting the average of a field using "across field"

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] Problem getting the average of a field using "across field"
 Login/Join
 
Member
posted
Hi....I'm using the below code :
DEFAULT &YEAR =2012;
TABLE FILE DEPT
SUM AVE.QNTY NOPRINT
BY DIVISION
BY MSC

SUM QNTY
COMPUTE YTD_AVG/D20 = C1;
BY DIVISION
BY MSC
ACROSS WEEKS
WHERE YEAR EQ &YEAR;
END
-RUN
-EXIT

Here,for example I might be having say 8 weeks for the year 2012 namely :1,3,4,5,6,7,8,9.Now iam not getting the correct YTD_AVG for all the divisions.Iam getting the correct average value for 1 or 2 divisions.
This would be the formulae which applies for calculating the average :YTD_AVG=(SUM.QNTY/CNT.DST.WEEKS)-->(1+3+4+5+6+7+8+9)/8
Could anyone please help me with this problem?Thanks a lot in advance!

This message has been edited. Last edited by: Kathleen Butler,


webfocus 769,windows 7,html
 
Posts: 24 | Registered: July 16, 2010Report This Post
Expert
posted Hide Post
Hi info4pals,

From our technicals: please try BY YEAR after BY MSC in both verb sets. If this does not work, please open a case with Customer Support Services. You may call at 1-800-736-6130, or access online at InfoResponse.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Expert
posted Hide Post
Hi info4pals,

From our technicals: please try this code.
DEFINE FILE EMPDATA
YEAR/YY=HIREDATE;
DT_HIREDATE/HYYMDS=HDTTM(HIREDATE, 8, 'HYYMDS');

YRWK/I2=HPART(DT_HIREDATE, 'WEEK', 'I2');
END
TABLE FILE EMPDATA
-*PRINT HIREDATE DT_HIREDATE YRWK
-*BY YEAR

SUM AVE.SALARY
BY DIV
BY DEPT
BY YEAR

SUM SALARY

BY DIV
BY DEPT
BY YEAR
ACROSS YRWK
COMPUTE YTD_AVG/D20 = C1;
WHERE YEAR EQ 1989;
END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 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     [Closed] Problem getting the average of a field using "across field"

Copyright © 1996-2020 Information Builders