Focal Point
MAX Function for a ROW of FIELDS

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

July 24, 2006, 01:44 PM
neuro
MAX Function for a ROW of FIELDS
I know there is a MAX function for getting the highest number within one field. What if I have a Report where 1 ROW has 5 COLUMNS/FIELDS of DATA and I want to have a 6th COLUMN/FIELD that displays the MAX VALUE from the 5 COLUMNS/FIELDS?


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
July 24, 2006, 02:26 PM
ptp
try the MAX funtion, a simplified example is below:
----------------------------------------------------------

DEFINE FILE x
COL6/P12.2 = MAX(COL1,COL2,COL3,COL4,COL5,.....);
END

TABLE FILE x
PRINT COL1
COL2
COL3
COL4
COL5
COL6 AS 'MAX VALUE FOR COLS 1-5'
BY SORT1
END

----------------------------------------------------------
Good luck,
Paul.
July 24, 2006, 02:37 PM
neuro
AWESOME, that works, thank you thank you!


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11