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] How to give average of percentage as subfooter for a report?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to give average of percentage as subfooter for a report?
 Login/Join
 
Gold member
posted
Hi,

I want the report as below:
.0240 M 33.3750 N 7292 Closed 5 4/21/2014 7/14/2014 80,000 85,310 100.00% 85,310 106.64% 0
.0300 M 54.5000 N 7148 Closed 5 4/11/2014 7/7/2014 40,000 42,550 100.00% 42,550 106.38% 0
.0360 M 54.5000 N 4570 Closed 5 1/31/2014 7/7/2014 80,000 84,692 100.00% 84,692 105.87% 0
.0240 M 53.1230 N 7139 Closed 5 4/11/2014 7/14/2014 40,000 46,595 100.00% 46,595 116.49% 0
.0240 M 61.3750 N 7140 Open 5 4/11/2014 7/14/2014 48,500 0 0.00% 0 0.00% 0
.0260 M 60.8800 N 7295 Closed 5 4/21/2014 7/7/2014 40,000 41,722 100.00% 41,722 104.31% 0
.0260 M 60.8800 N 8367 Closed 5 5/9/2014 7/7/2014 40,000 44,338 100.00% 44,338 110.85% 0
.0150 M 41.8100 N 7291 Closed 5 4/21/2014 7/7/2014 40,000 36,530 100.00% 36,530 91.33% 0
Grand Totals 220,577,257 83,613,667 91,993,684

Average % . . 41.36% . 48.04%


Average% is basically the average of % values. I have given it in footer as:
ON TABLE SUBFOOT
"Grand Totals <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> "Average % <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0>
Grand total is coming correctly but Average% is just taking the last records. It's not averaging.
Can anyone help me on this?

Thanks,
Pravin

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
 
Posts: 51 | Location: WebFOCUS 7.7.03 | Registered: June 19, 2014Report This Post
Virtuoso
posted Hide Post
I would suggest to process your detail, grand total and average in three separate table file then merge them all together based on an id for each kind of table, per example : 0det, 1tot, 2avg to have them in the proper order. You can then manage the skip line, header and footer based on these id.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
Hi Pravin,
Try using prefix operators in the footer.
Below sample code may help:
DEFINE FILE CAR
PERC/D20.2%=DEALER_COST/RETAIL_COST;
END
TABLE FILE CAR
SUM DEALER_COST
RETAIL_COST
PERC
COMPUTE PERC1/D20.2%=DEALER_COST/RETAIL_COST;
BY COUNTRY
ON TABLE COLUMN-TOTAL
FOOTING
"AVERAGE <+0> <+0> AVE.PERC AVE.PERC1"

ON TABLE SET STYLE *
TYPE =FOOTING,
HEADALIGN=BODY,
$
ENDSTYLE
END

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


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
 
Posts: 82 | Registered: January 06, 2014Report This Post
Gold member
posted Hide Post
Thanks Martin and Jvb for your inputs. Merging the files, I would try as last attempt.

I tried "AVERAGE <+0> <+0> AVE.PERC AVE.PERC1". but it is displaying last record only as % not actual average.

Thanks,
Pravin

This message has been edited. Last edited by: Pravin.Singh,


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
 
Posts: 51 | Location: WebFOCUS 7.7.03 | Registered: June 19, 2014Report This Post
Gold member
posted Hide Post
Have you tried RECAP command.
DEFINE FILE CAR
PERC/D20.2%=DEALER_COST/RETAIL_COST;
END
TABLE FILE CAR
SUM DEALER_COST
RETAIL_COST
PERC
BY COUNTRY
ON TABLE HOLD AS HLD
END
-RUN
DEFINE FILE HLD
CNT/D1=1;
CNT1/D2=1;
END
TABLE FILE HLD
SUM DEALER_COST
RETAIL_COST
PERC
CNT1 NOPRINT
BY CNT NOPRINT
BY COUNTRY
ON CNT RECAP Average_Percentage/D20.2%=PERC/CNT1;
ON TABLE PCHOLD FORMAT HTML
END


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
 
Posts: 82 | Registered: January 06, 2014Report This Post
Expert
posted Hide Post
Have you considered SUMMARIZE or RECOMPUTE?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Thanks JVB!!!

It did work... I will try to implement in my report.

Thanks,
Pravin


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
 
Posts: 51 | Location: WebFOCUS 7.7.03 | Registered: June 19, 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] How to give average of percentage as subfooter for a report?

Copyright © 1996-2020 Information Builders