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.
I'm trying to calculate an average, but in my detail, I have record with 0 value entries. I need to show it on the report, so I can't just leave it out.
For example: I have the following dataset:
Name Performance Score Maria 0.00% Richard 93.3% Diana 94.5% Molly 90.0%
I want to find the average performance score, but I want to leave out Maria entry in the calculation because she hasn't been inspected so it is not valid to include her score.
Here is my code:
DEFINE FILE COMPLETELIST2 ONE/I5=1; END
TABLE FILE COMPLETELIST2 PRINT TYPECODEDESCRIPTION AS 'Inspection,Type' INPNUM4 AS 'Inspection #' COMPUTE TINPNUM/D4 = FST.ONE; AS ' ' COMPUTE TITEMNUMBER/D12 = ITEMNUMBER/FST.ONE; AS '# of Items,Inspected' COMPUTE TSATRATE/D12.2% = SATRATE/FST.ONE; AS 'Overall,Score' BY LOCATION AS 'Location' BY CREWLEADER AS 'Crew Leader' BY INPDATE2 AS 'Inspection,Date' BY INSPECTORNAME AS 'Inspector' ON LOCATION SUMMARIZE AS 'AVG TOTAL FOR: '; END
World, i don't understand your code, but in general, if you want to nuke 0 values in computing an average, try this: DEFINE FILE ... NEWVALUE/I8 MISSING ON = IF OLDVAL EQ 0 THEN MISSING ELSE OLDVAL; END TABLE FILE ... SUM ... AVE.NEWVALUE AS 'average' ...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003