I would like to generate a cumulative sum of the variable DosesAdministered that occur between the administereddate variable and the createdon variable. This represents the queue of outstanding doses that have not yet been created on each date. Does anyone have a suggestion on some syntax that would work for this purpose? Provided some example data below. I've included weekstartdate variable, as I intend to collapse the data by this weekly start date for graphing purposes. Kind thanks in advance for any guidance.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float administereddate byte DosesAdministered float createdon int weekstartdate 23254 . . 23249 23255 . . 23249 23256 . . 23256 23257 . . 23256 23258 . . 23256 23259 . . 23256 23260 . . 23256 23261 . . 23256 23262 . . 23256 23263 . . 23263 23264 . . 23263 23265 . . 23263 23266 . . 23263 23267 . . 23263 23268 . . 23263 23269 . . 23263 23270 . . 23270 23271 . . 23270 23272 . . 23270 23273 . . 23270 23274 . . 23270 23275 . . 23270 23276 . . 23270 23277 . . 23277 23278 . . 23277 23279 . . 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23280 1 23285 23277 23280 1 23281 23277 23280 1 23281 23277 23281 1 23285 23277 23281 1 23285 23277 23281 1 23285 23277 end format %tdDD-Mon-YY administereddate format %tdDD-Mon-YY createdon format %tdnn/dd/CCYY weekstartdate
Comment