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] summarize time field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] summarize time field
 Login/Join
 
Platinum Member
posted
Not sure how to do this..looking to summarize a computed time field. Found example on this forum however, the time field does not summarize. Any help would be appreciated.

Thanks

TABLE FILE AHTDIV
PRINT 
     calls/I11C AS 'Calls Answered,'
     COMPUTE AVGTalk/I3 = IF calls EQ 0 THEN 0 ELSE acdtime / calls;
     COMPUTE AVGACW/I3 = IF calls EQ 0 THEN 0 ELSE acwtime / calls;
     COMPUTE AVGHold/I3 = IF calls EQ 0 THEN 0 ELSE holdacdtime / calls;
     COMPUTE AHT/I3 = IF calls EQ 0 THEN 0 ELSE ( acdtime + acwtime + holdacdtime ) / calls;
     COMPUTE AUX/D6.2 = IF stafftime EQ 0 THEN 0 ELSE ( aux0 + aux1 + aux2 + aux3 + aux4 + aux5 + aux6 + aux7 + aux8 ) / stafftime;
     COMPUTE HOURS/I3 = INT(stafftime / 3600); NOPRINT
     COMPUTE MINUTES/I2 = INT(stafftime / 60) - ( HOURS * 60 ); NOPRINT
     COMPUTE REM_SECONDS/I2L = stafftime - ( HOURS * 3600 ) - ( MINUTES * 60 ); NOPRINT
     COMPUTE TOTALTIME/A20 = EDIT(HOURS)|':'|EDIT(MINUTES)|':'|EDIT(REM_SECONDS);
BY EmpDivisionName AS 'Division'
HEADING
"PNC Call Center AHT Report"
"Between <+0>&dte<+0> and <+0>&edte"
" "
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE SUMMARIZE AHTDIV.SEG01.calls AVGTalk AVGACW AVGHold AHT AUX HOURS MINUTES REM_SECONDS AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML  

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


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 2006Report This Post
Virtuoso
posted Hide Post
quote:
TOTALTIME

That's the field you want to summarize, correct?
If so, then this is indeed not done this way. I think it does show you the correct values at the division level. But it will not add all divisions, since it is an alpha field.
To get this done on an overall basis, you would have to do the same calculations to get to the TOTALTIME but then for the entire report and not just for the division level.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
yes..TOTALTIME is the field I was looking to have a total time. Do you build this out in the define and how do you call it? Thanks!


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 2006Report This Post
Platinum Member
posted Hide Post
Computes happen at the end of the stack, so I would say make your HOURS, MINUTES, and SECONDS fields Define fields, not COMPUTE and then COMPUTE each of them separately. Then, concat them together at the very end.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
Adding on to what T.Peters suggests, I would just add up stafftime (which appears to be in seconds) and then do some COMPUTEs (which happen on the SUMMED value to create the HH:MM:SS output.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Here is an example, using the CAR file, of the approach suggested by earlier posts. The formatted time display is recalculated at the end of the request using the total sum of the staff time column.

DEFINE FILE CAR
 STAFF_TIME/I6 = SALES ;
END

TABLE FILE CAR
 PRINT
  COMPUTE HOURSX/I2   = INT(STAFF_TIME / 3600); NOPRINT
  COMPUTE MINUTESX/I2 = INT(STAFF_TIME / 60) - ( HOURSX * 60 ); NOPRINT
  COMPUTE SECONDSX/I2 = STAFF_TIME - ( HOURSX * 3600 ) - ( MINUTESX * 60 ); NOPRINT
  COMPUTE ST_TIME/A8  = EDIT(HOURSX,'99')|':'| EDIT(MINUTESX,'99')|':'| EDIT(SECONDSX,'99'); AS 'Staff Call Time'
 WHERE SALES NE 0 ;
 ON TABLE RECAP
  TOT_HOURS/I2   = INT(SUM.STAFF_TIME / 3600);
  TOT_MINUTES/I2 = INT(SUM.STAFF_TIME / 60) - ( TOT_HOURS * 60 );
  TOT_SECONDS/I2 = SUM.STAFF_TIME - ( TOT_HOURS * 3600 ) - ( TOT_MINUTES * 60 );
  TOT_TIME/A8    = EDIT(TOT_HOURS)|':'| EDIT(TOT_MINUTES)|':'| EDIT(TOT_SECONDS);
 ON TABLE SUBFOOT
  "Total <TOT_TIME"
 ON TABLE SET STYLE *
  TYPE=DATA, COLUMN=ST_TIME, JUSTIFY=RIGHT, $
  TYPE=SUBFOOT, HEADALIGN=BODY, JUSTIFY=RIGHT, $
 ENDSTYLE
END

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
Good One
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] summarize time field

Copyright © 1996-2020 Information Builders