Focal Point
To have percentage % for the total generated in the report

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2031010802

January 18, 2007, 08:50 AM
Ashok
To have percentage % for the total generated in the report
Hi Everyone,

I have a report which works fine. I have 5 define fields which actually extracts records based on some conditions.

I have enabled column total option for this 5 define fields.

Can anyone help me in generating the percentage values for this column total and need to display the percentage values just below the total respectively.

Regards,
Ashok kumar M
January 18, 2007, 09:02 AM
FrankDutch
Ashok

you want something like

..........define1 define2 define3 define4 define5
total.....def1....def2....def3....def4....def5
perc.......15%.....35%.....22%.....18%.....10%

so the with a rowtotal the 15+35+22+18+10=100%

Is this what you want?




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

January 18, 2007, 01:27 PM
ET
Here is an example using the car file.

TABLE FILE CAR
PRINT DEALER_COST SALES
BY CAR UNDER-LINE SUBTOTAL
ON CAR COMPUTE TOTAMT/P12=DEALER_COST + SALES;
COMPUTE DPCT/P6.2%=DEALER_COST / TOTAMT * 100;
COMPUTE SPCT/P6.2%=SALES / TOTAMT * 100;
ON CAR SUBFOOT
" " "
END



CAR DEALER_COST SALES
--- ----------- -----
ALFA ROMEO 5,660 12400
5,660 13000
4,915 4800

*TOTAL ALFA ROMEO
16,235 30200

34.96% 65.04%

Good luck


FOCUS 7.6 MVS PDF,HTML,EXCEL
January 19, 2007, 05:34 AM
Ashok
Yes Frank.... You are right. It is the same what I am looking for. How do I accomplish this.

Thanks & Regards,
Ashok kumar
January 19, 2007, 06:16 AM
Tony A
Ashok,

There will be many ways to achieve this and I'm sure you'll be flooded with possible solutions.

Here's one to get you started -
TABLE FILE GGSALES
SUM DOLLARS
IF DATE FROM '19960101' TO '19971231'
ON TABLE SAVE
END
-RUN
-READ SAVE, &Tot_Dollars

DEFINE FILE GGSALES
  MONTH/M = DATE;
END
TABLE FILE GGSALES
SUM DOLLARS AS 'Dollars'
OVER COMPUTE PCT_DOLLAR/D6.2% = DOLLARS / &Tot_Dollars * 100; AS 'Percentage'
ACROSS MONTH
IF DATE FROM '19960101' TO '19971231'
ON TABLE ROW-TOTAL AS 'Row Total'
ON TABLE SET PAGE-NUM OFF
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10