Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Subtotal with Percentage
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Subtotal with Percentage
 Login/Join
 
Master
posted
I have a fex that shows Group, Department, BadDebt, Charges and Percenatge. Percenatge is a compute: (Bad Debt / Charges) *100.

I need to add a subtotal on Department.

Best I can do so far is get the BadDebt and Charges correctly subtotalled with an AVERAGE of my Percentage column. I want the fex to be able to claculate the Percentage at the Deptartment level based on the subtotalled BadDebt and Charges.

The code below works...allbeit is providing an average on my percentages...not really what I want...

TABLE FILE HOLDMERGE
SUM
HOLDMERGE.HOLDMERG.BADDEBT AS 'Bad Debt'
HOLDMERGE.HOLDMERG.CHGS AS 'Charges'
COMPUTE PERCENTAGE/D12.2 = ( HOLDMERGE.HOLDMERG.BADDEBT / HOLDMERGE.HOLDMERG.CHGS ) * 100; AS 'Percentage'

BY LOWEST J0.TBLMSTR_BANBRBANAMEXREF.IDXSPECIALTY
BY LOWEST J0.TBLMSTR_BANBRBANAMEXREF.RPTBANBR
BY J0.TBLMSTR_BANBRBANAMEXREF.RPTBANAME

ACROSS LOWEST HOLDMERGE.HOLDMERG.FY
ACROSS LOWEST HOLDMERGE.HOLDMERG.PERIOD AS 'Period'

ON J0.TBLMSTR_BANBRBANAMEXREF.IDXSPECIALTY SUBTOTAL
HOLDMERGE.HOLDMERG.BADDEBT
HOLDMERGE.HOLDMERG.CHGS
AVE. PERCENTAGE AS '*TOTAL'
WHERE HOLDMERGE.HOLDMERG.FY EQ 2014;

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


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 572 | Registered: June 28, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Can't you use SUMMARIZE in place of SUBTOTAL?

DEFINE FILE CAR
FY/A4 = '2014';
PRD/A3 = 'JAN';
END
TABLE FILE CAR
SUM DEALER_COST RETAIL_COST
COMPUTE PCT/D12.2% = (DEALER_COST/RETAIL_COST) * 100;
BY COUNTRY
BY CAR
BY MODEL
ACROSS FY AS ''
ACROSS PRD AS ''
ON COUNTRY SUMMARIZE
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Master
posted Hide Post
*****CLOSED

I actualyy got it working this way:
TABLE FILE HOLDMERGE
SUM
HOLDMERGE.HOLDMERG.BADDEBT AS 'Bad Debt'
HOLDMERGE.HOLDMERG.CHGS AS 'Charges'
COMPUTE PERCENTAGE/D12.2 = ( HOLDMERGE.HOLDMERG.BADDEBT / HOLDMERGE.HOLDMERG.CHGS ) * 100; AS 'Percentage'
BY LOWEST J0.TBLMSTR_BANBRBANAMEXREF.IDXSPECIALTY
BY LOWEST J0.TBLMSTR_BANBRBANAMEXREF.RPTBANBR
BY J0.TBLMSTR_BANBRBANAMEXREF.RPTBANAME
ACROSS LOWEST HOLDMERGE.HOLDMERG.FY
ACROSS LOWEST HOLDMERGE.HOLDMERG.PERIOD AS 'Period'

ON J0.TBLMSTR_BANBRBANAMEXREF.IDXSPECIALTY RECOMPUTE
SUM. 'HOLDMERGE.HOLDMERG.BADDEBT'
SUM. 'HOLDMERGE.HOLDMERG.CHGS'
PERCENTAGE AS '*TOTAL'
WHERE HOLDMERGE.HOLDMERG.FY EQ 2014;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET BYDISPLAY ON


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 572 | Registered: June 28, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Subtotal with Percentage

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.