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.
There is a defined column for Average of counts ("counts" is defined column having rownumber). As per the requirement, need to do SUM(AVE.COUNT) based on BY field.
When I do SUM(Count), its coming fine but not able to do sum on AVE.COUNT, is there any method to acheive sum up the AVG of Counts.
Could you please let me know , how to handle this ??
Thanks, SenthilThis message has been edited. Last edited by: <Kathryn Henning>,
I think I know what you mean, but could post an example of what you're trying?
( You could always add an extra Row-counter and devide the sum by the number of rows... )
e.g.
DEFINE FILE CAR
ROWCOUNTER/I11 = 1;
END
TABLE FILE CAR
SUM SALES NOPRINT
ROWCOUNTER NOPRINT
COMPUTE AVG_SALES/D12.2 = SALES / ROWCOUNTER;
BY COUNTRY
END
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
Dave , Here is the sample code, DEFINE FILE CAR Count/I5=1; MDEL_LEN/A50=CAR.CARREC.MODEL ||EDIT(CAR.SPECS.LENGTH); END TABLE FILE CAR SUM CAR.BODY.SALES AVE.Count AS 'AVE,Count' BY LOWEST CAR.ORIGIN.COUNTRY BY LOWEST CAR.COMP.CAR BY CAR.SPECS.MDEL_LEN NOPRINT ACROSS LOWEST CAR.BODY.SEATS ON TABLE SET PAGE-NUM NOLEAD ON TABLE ROW-TOTAL AS 'TOTAL' ON TABLE COLUMN-TOTAL AS 'TOTAL' ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=DATA, COLUMN=N4, BACKCOLOR='WHITE', $ TYPE=ACROSSVALUE, ACROSS=1, BACKCOLOR='WHITE', $ TYPE=REPORT, COLUMN=N3, SQUEEZE=1.416667, $ ENDSTYLE END
DEFINE FILE CAR
Count/I5=1;
MDEL_LEN/A50=CAR.CARREC.MODEL ||EDIT(CAR.SPECS.LENGTH);
END
TABLE FILE CAR
SUM
CAR.BODY.SALES
Count
-*AVE.Count AS 'AVE,Count'
BY LOWEST CAR.ORIGIN.COUNTRY
BY LOWEST CAR.COMP.CAR
-*BY CAR.SPECS.MDEL_LEN
ACROSS LOWEST CAR.BODY.SEATS
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
COLUMN=N4,
BACKCOLOR='WHITE',
$
TYPE=ACROSSVALUE,
ACROSS=1,
BACKCOLOR='WHITE',
$
TYPE=REPORT,
COLUMN=N3,
SQUEEZE=1.416667,
$
ENDSTYLE
END
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
That will change the outcome of the SUM for each row. Even with NOPRINT.
If you need the SUM values on each row independent of the commented By-Field you might want to add it later ( with MATCH for example ) or use sort-groups.
G'luck.
( I'm still trying to understand want the desired functionality is ).
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010