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] Avg on Total Line

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Avg on Total Line
 Login/Join
 
Platinum Member
posted
Is it possible to do an average. I searched the forum and was unable to see anything that could help. I tried summarized on column total and it resulted in a sum. Field in question is already aggregated as an average. code:
 TABLE FILE TEAM_HIARCHY
SUM 
     AVE.SCORE AS 'GROUP,AVERAGE'
     CNT.totno AS 'Total No.,Monitored'
     above AS 'No of FSC(s),100% or Above'
     BELOW AS 'No of FSC(s),Below 75%'
     zero AS 'No of Zero,Call(s) Scored'
BY MANAGER
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE SUMMARIZE VERINT3.SEG01.SCORE VERINT3.SEG01.totno VERINT3.SEG01.above VERINT3.SEG01.BELOW VERINT3.SEG01.zero AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE * 


Thanks for any assistance possible.

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
Joe

If you want the overall average of the score a multiverb might do the job.

DEFINE FILE CAR
NEWSAL=SALES;
DUMMY/A1='';
END

TABLE FILE CAR
SUM  AVE.NEWSAL
BY DUMMY
SUM AVE.SALES
BY COUNTRY
END




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
Virtuoso
posted Hide Post
Is this what you're looking for?

TABLE FILE CAR
PRINT 
 COMPUTE ONE/I9     = SEATS / SEATS ;    NOPRINT
 COMPUTE _SEATS/D9.2= SEATS / ONE ;      AS SEATS
 COMPUTE _COST/D9.2 = DEALER_COST / ONE; AS DEALER_COST
BY CAR 
BY MODEL
ON TABLE SUMMARIZE
END


- 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
You can also use prefix operators on the Summary Lines.

ON TABLE SUMMARIZE
AVE. SCORE
totno -*(SUM. is the default operator)
above
BELOW
zero

I believe MAX. MIN. and a few others also work. Note that the correct syntax is prefix,dot,space,fieldname. If you don't have the space, it doesn't work.


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
Expert
posted Hide Post
joe,
please excuse my restating the obvious:
if you COMPUTE the a calculation in your fex,
then as Jack says, the ON TABLE SUMMARIZE
will effectively reCOMPUTE that calculation,
and give you a weighted result.

if you don't COMPUTE a calculation in your fex,
(eg you DEFINE your calculation)
and just want an unweighted result on the total line, then as Darin says, the AVE. prefix will produce that result.

its important to know which way you want, weighted or not.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Thanks for all the advice. Susan led me in the right direction. I ended up building a compute field and then summarized to make the totals work correctly. What I was doing before was just averaging the field with the AVE. prefix which caused the total line to sum. Thanks for the help.


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 2006Report This Post
Expert
posted Hide Post
I learned something today from Noreen
AVE.field is weighted
AVE. field (with a blank after the period) is unweighted.
So...
on your columns, use AVE.field
and on your SUBTOTAL use AVE. field to get an average of the averages...
Her webinar will be posted up on the ibi website in a day or two... the title of it is 'Betcha Didn't Know'... Smiler




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
I am running into a similar problem. I am getting the sum for field ASALES instead of the average. I do get desired result when I do 'ON TABLE SUBTOTAL AVE. ASALES' but don't want to go that route and want to get the averages and sums without specifying the prefix operators with every field. Any ideas how I can accomplish that? Thanks.

 
TABLE FILE CAR
SUM 
DEALER_COST 
COMPUTE ASALES = AVE.SALES;
BY COUNTRY
ON TABLE SUMMARIZE 
END

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


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 69 | Registered: March 11, 2010Report This Post
Member
posted Hide Post
TRY THIS

DEFINE FILE CAR
ICNT/I6 = IF SALES NE 0.0 THEN 1 ELSE 0;
END
TABLE FILE CAR
SUM
DEALER_COST
SALES NOPRINT
ICNT NOPRINT
COMPUTE ASALES/I6 =SALES/ICNT;
BY COUNTRY
ON TABLE SUMMARIZE
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 5 | Registered: February 12, 2013Report This Post
Gold member
posted Hide Post
It worked. Thanks!


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 69 | Registered: March 11, 2010Report 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] Avg on Total Line

Copyright © 1996-2020 Information Builders