Focal Point
[SOLVED] Percentage of sub-total rather than percetage of grand total

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

January 29, 2018, 08:59 PM
Jeff-TTC
[SOLVED] Percentage of sub-total rather than percetage of grand total
Hello all.

I am able to get the revenue percentage for each given entry using PCT as follows:

COMPUTE MTDRevenue_PoT/D7.4% = PCT.MTDRevenue;

This works beautifully but is based on the grand total of the report. If, however, the report was subtotaling by month I would want to show this same percentage of revenue for each month. As such, is there a similar helpful "PCT" command to get this, such as SUBPCT or something to that effect?

Thanks all!

Edit: I found the following example that appears like it would work, but I receive a parsing error on "WITHIN":

COMPUTE MTDRevenue_PoG/D7.4% = PCT.MTDRevenue WITHIN RevenueMonth; AS 'Monthly Percent'

RevenueMonth is the primary "BY".

This message has been edited. Last edited by: Jeff-TTC,


WebFocus Server 8.2.01M
WebFocus App Studio 8.2.01M
Windows Server 2012 R2 Standard
All Outputs
January 30, 2018, 01:56 AM
Danny-SRL
Try this:
  
TABLE FILE CAR
SUM PCT.RCOST WITHIN COUNTRY NOPRINT
COMPUTE JEFF/D6.2%=C1;
BY COUNTRY SUBTOTAL
BY CAR
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

January 31, 2018, 08:55 PM
Jeff-TTC
That worked!

Thanks much!


WebFocus Server 8.2.01M
WebFocus App Studio 8.2.01M
Windows Server 2012 R2 Standard
All Outputs
February 01, 2018, 06:08 AM
Danny-SRL
Jeff,
That it worked is a fact.
The question is: do you understand?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF