[SOLVED] Limiting Columns Displayed in ACROSS Command
I'm trying to create a simple report with yield curves shown in each column. I'd like to limit the report to the five most recent yield curve dates in my source file. When I try to limit the number of columns shown in the ACROSS command, WebFocus gives me a FOC 1974 warning saying that it cannot process the limit in the ACROSS command. Any ideas for a workaround?
Thanks in advance for any help.
Here is the code: DEFINE FILE VOYA_PAR MONTH/I4 = DATEDIF(ASOF_DATE, DATE, 'M'); END TABLE FILE VOYA_PAR SUM VOYA_PAR.VOYA_PAR.USD_FITTED/D8.6 BY LOWEST MONTH ACROSS HIGHEST 5 VOYA_PAR.VOYA_PAR.ASOF_DATE ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * $ ENDSTYLE ENDThis message has been edited. Last edited by: Glenn@VoyaIM,
WebFOCUS 8 Windows, All Outputs
June 24, 2015, 08:55 AM
Prarie
Do it in two passes. Get your Data by Highest 5 and hold it in a file. Then do the across with the hold file.
June 24, 2015, 09:11 AM
Glenn@VoyaIM
Prarie, Thanks very much for the suggestion.
Here's the code that ended up working: DEFINE FILE VOYA_PAR MONTH/I4 = DATEDIF(ASOF_DATE, DATE, 'M'); END TABLE FILE VOYA_PAR SUM VOYA_PAR.VOYA_PAR.USD_FITTED BY HIGHEST 5 ASOF_DATE BY LOWEST MONTH ON TABLE HOLD AS VOYA_PARX END TABLE FILE VOYA_PARX SUM USD_FITTED/D8.6 BY LOWEST MONTH ACROSS HIGHEST ASOF_DATE ON TABLE SET HOLDLIST PRINTONLY ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * $ ENDSTYLE END