Focal Point
[SOLVED] Accumulate cnt of rows

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

December 21, 2009, 10:58 AM
lovime85
[SOLVED] Accumulate cnt of rows
Hi!
I have a table that have a datetime column with a by... and I want another column with count of people..but while the datetime grows i want the other column to sum the cnt of the row before plus the new cnt of the row..
ie
datetime people <--cnt of people in that datetime
2009/12/19 3
2009/12/20 5 <---3 from the last row and 2 more from this row
2009/12/21 10 <---5 from the last row and 5 more from this row

Thanks in advance Big Grin

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


WebFOCUS 7.6, Windows
All output
December 21, 2009, 11:31 AM
fatboyjim
Hi,

Is this something that you are looking for?
It basically append the count on the BY.

Best Regards,

Jimmy Pang

TABLE FILE EMPDATA
SUM
CNT.PIN AS 'PIN'
BY DIV
ON TABLE HOLD AS HLDCNT
END

DEFINE FILE HLDCNT
ASDF/D12.2 = ASDF + PIN;
END

TABLE FILE HLDCNT
PRINT DIV
ASDF
END


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
December 21, 2009, 12:11 PM
WF_Novice
quote:

I have a table that have a datetime column with a by


Take a look at this..
  
TABLE FILE CAR
PRINT COUNTRY MODEL CAR SEATS 
AND COMPUTE T1/I5 = IF COUNTRY NE LAST COUNTRY THEN SEATS ELSE SEATS + T1 ;
BY COUNTRY
END

December 21, 2009, 12:32 PM
Dan Satchell
Or simply:

TABLE FILE CAR
SUM SEATS 
AND COMPUTE ROLLING_SEAT_CNT/I9 = LAST ROLLING_SEAT_CNT + SEATS ;
BY COUNTRY
END



WebFOCUS 7.7.05
December 21, 2009, 12:53 PM
lovime85
THANK YOU So MUCH !!!
that did the trick Big Grin
Good One


WebFOCUS 7.6, Windows
All output