Focal Point
[CLOSED] Sort across part of the report columns

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

May 14, 2015, 11:35 AM
WebFocusDiver
[CLOSED] Sort across part of the report columns
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.

Thanks

This 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.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
May 15, 2015, 08:32 AM
Tony A
Welcome to the forum Smiler

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