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]Average and Max of a Compute?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Average and Max of a Compute?
 Login/Join
 
Silver Member
posted
Hi,

Right now, I created a define to change a couple of time fields to the right format, then I've created a computed field that shows the difference between these two times (start and end time). I was wondering if it is possible to show the average time difference as well as the maximum time difference, by each of my BY fields? Thank you.

My code is as follows:


DEFINE FILE FACT_OR
Start_time/HHIA =HINPUT(12,'00000000' | FACT_OR.FACT_OR.START_TIME,8,'HHI') ;
End_time/HHIA =HINPUT(12,'00000000' | FACT_OR.FACT_OR.CLOSE_TIME,8,'HHI') ;
END

TABLE FILE FACT_OR
SUM
COMPUTE Length/D12.2 = HDIFF(FACT_OR.FACT_OR.End_time, FACT_OR.FACT_OR.Start_time, 'MINUTE', 'D9');
FACT_OR.FACT_OR.Start_time
FACT_OR.FACT_OR.End_time
CNT.FACT_OR.FACT_OR.CASE_NUMBER AS 'Volume'
BY LOWEST FACT_OR.FACT_OR.SERVICE

This message has been edited. Last edited by: hfung1,


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Virtuoso
posted Hide Post
You can put the computed field in your define also, and then use the sum ave.defined field to show the average per your by-fields.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Hi,

If you put your calculation in a COMPUTE, be aware that WF will SUM the Start_time and the End_time and after will calculate the difference. I doubt this is the answer you will want.

So, as GamP rightly suggests, put the calculation in the DEFINE.


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
Silver Member
posted Hide Post
Thank you it works!


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report 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]Average and Max of a Compute?

Copyright © 1996-2020 Information Builders