Focal Point
[CLOSED] regarding the MAX of date.

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

October 05, 2010, 02:52 PM
swati
[CLOSED] regarding the MAX of date.
HI ALL,

i have a report which contains some 100 records,out of those 100 record,first 25 are same record,next 25 are same,like wise i have 4 sets of 25 each.
Now i want to display only 4 records only i.e; out of each 25 set i want to display only 1,so please guide me on How to proceed.
i am using distinct and it's not working;i have as field called date,can i use Max of that date to pull only one record per set.(each set has similar date,so can i proceed with max date).
please help....

This message has been edited. Last edited by: Kerry,


7.6.7
windows
PDF,EXCEL.
October 05, 2010, 04:22 PM
GamP
SUM fst./max./lst./ave. (select what is appropriate) BY DATE


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
October 05, 2010, 08:02 PM
Arif
I think i dont understand your question. Are you useing BY DATE field? If you have hidden sort fields? Are you using developer studio to write this report? I dev studio you can uncheck repete sorted value or in code you can see if BY DISPLAY OFF?


WebFOCUS 7.6.10
Windows
HTML
October 06, 2010, 07:51 PM
Bethanne
Ok I assume you have the sort correctly, so what you want is the 1st record.
add the following to your report.
COMPUTE GOODREC/A1=IF FIELDNAME NE LAST FIELDNAME THEN 'Y'
REPEAT THIS OVER AND OVER TO INCLUDE ALL YOUR SORT FIELDS
ELSE 'N'; NOPRINT

.
.
.
.
WHERE TOTAL GOODREC EQ 'Y';