I am trying to create a report that sort down by first column, sum on market value, then sort across on different interest rate scenarios. Here is what should look like:
Portfolio Mkt Value A B C D Q
Type A 3,993,605 0.22 0.22 0.22 0.00 -2.00 Type B 13,062 0.23 0.57 0.99 0.00 -1.92
here is the code: TABLE FILE INVESTMENT/FINANCIAL_MODELING SUM BaseMV/D12c COMPUTE WAGMY/D12.2 = BMV_MY / BaseMV; NOPRINT AS 'Mkt Yield' COMPUTE WAGEffDur/D12.2 = BMV_ED / BaseMV; NOPRINT AS 'Eff Dur' COMPUTE WAGCON/D6.2 = BMV_CON / BaseMV; NOPRINT AS 'Eff Conx' COMPUTE WAGED/D12.2 = MV_ED / MV; AS 'Effective Duration' BY PORTFOLIO WHERE ClientName LIKE '&ClientName.Client Name.'; WHERE HOLDINGDATE EQ &HOLDINGDATE.Valuation Date.; ON TABLE SET PAGE-NUM NOLEAD ON TABLE SUMMARIZE AS 'TOTAL' ON TABLE PCHOLD FORMAT HTML
I have a field that has value of A,B,C,D,Q and would like to display WAGED field by this field.
ThanksThis message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 8.1.05 Windows, All Outputs
May 15, 2015, 08:24 AM
George Patton
A MULTI-VERB request would seem to be the solution.
TABLE FILE XYZ
SUM
A
B
C
BY X
SUM (or maybe PRINT - depending on what you are trying to do)
D
BY X
BY Y
END
If that doesn't do what you want you will likely have to do it in two steps - create a hold file with an intermediate result and use that as the basis for your main report.
The closest that you could get to this (without using a few computes etc.) is -
A B C D Q
Portfolio Mkt Value
Type A 3,993,605 0.22 0.22 0.22 0.00 -2.00
Type B 13,062 0.23 0.57 0.99 0.00 -1.92
.. using code like this -
TABLE FILE INVESTMENT/FINANCIAL_MODELING
SUM BaseMV/D12c
BY PORTFOLIO
SUM COMPUTE WAGED/D12.2 = MV_ED / MV; AS 'Effective Duration'
BY PORTFOLIO
ACROSS [field that has value of A,B,C,D,Q]
ON TABLE SET PAGE NOLEAD
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