I would greatly appreciate any assistance on this matter. I've been scouring the internet for solutions but my issue has multiple steps and sas is rather new to me. I am using SAS 9.4 TS Level 1M7. My issue is that I need to populate a new numeric variable named 'ME6' with the 'ME_October_t' from the end of the month, six months ago for each 'seccode' which is an ID (I have many different IDs). I used INTNX to calculate that lagged date respective for each 'seccode' and titled it in my dataset, 'date6'. After that, I can't seem to find a solution. I hope someone with far better coding skills can assist me! I'm at my wits end! It should look like the image below. I apologize for not using the actual data. If I did that, the picture would be too long since I have daily data and I need to lag it by six months. I hope you can understand it: So from the last line of my sample dataset below which is for date 19770908, the 'ME6' would be 1425346000 which is the 'ME_October_t' value on 19770331. Here's the sample dataset: data WORK.HELP_ANALYSIS; infile datalines dsd truncover; input data_date:YYMMDDN. seccode:6. ME_October_t:32. date6:YYMMDDN8.; format data_date YYMMDDN. seccode 6. date6 YYMMDDN8.; datalines; 19770104 1301 14253460000 19760731 19770105 1301 14253460000 19760731 19770106 1301 14253460000 19760731 19770107 1301 14253460000 19760731 19770108 1301 14253460000 19760731 19770110 1301 14253460000 19760731 19770111 1301 14253460000 19760731 19770112 1301 14253460000 19760731 19770113 1301 14253460000 19760731 19770114 1301 14253460000 19760731 19770117 1301 14253460000 19760731 19770118 1301 14253460000 19760731 19770119 1301 14253460000 19760731 19770120 1301 14253460000 19760731 19770121 1301 14253460000 19760731 19770122 1301 14253460000 19760731 19770124 1301 14253460000 19760731 19770125 1301 14253460000 19760731 19770126 1301 14253460000 19760731 19770127 1301 14253460000 19760731 19770128 1301 14253460000 19760731 19770129 1301 14253460000 19760731 19770131 1301 14253460000 19760731 19770201 1301 14253460000 19760831 19770202 1301 14253460000 19760831 19770203 1301 14253460000 19760831 19770204 1301 14253460000 19760831 19770205 1301 14253460000 19760831 19770207 1301 14253460000 19760831 19770208 1301 14253460000 19760831 19770209 1301 14253460000 19760831 19770210 1301 14253460000 19760831 19770212 1301 14253460000 19760831 19770214 1301 14253460000 19760831 19770215 1301 14253460000 19760831 19770216 1301 14253460000 19760831 19770217 1301 14253460000 19760831 19770218 1301 14253460000 19760831 19770221 1301 14253460000 19760831 19770222 1301 14253460000 19760831 19770223 1301 14253460000 19760831 19770224 1301 14253460000 19760831 19770225 1301 14253460000 19760831 19770226 1301 14253460000 19760831 19770228 1301 14253460000 19760831 19770301 1301 14253460000 19760930 19770302 1301 14253460000 19760930 19770303 1301 14253460000 19760930 19770304 1301 14253460000 19760930 19770305 1301 14253460000 19760930 19770307 1301 14253460000 19760930 19770308 1301 14253460000 19760930 19770309 1301 14253460000 19760930 19770310 1301 14253460000 19760930 19770311 1301 14253460000 19760930 19770312 1301 14253460000 19760930 19770314 1301 14253460000 19760930 19770315 1301 14253460000 19760930 19770316 1301 14253460000 19760930 19770317 1301 14253460000 19760930 19770318 1301 14253460000 19760930 19770322 1301 14253460000 19760930 19770323 1301 14253460000 19760930 19770324 1301 14253460000 19760930 19770325 1301 14253460000 19760930 19770326 1301 14253460000 19760930 19770328 1301 14253460000 19760930 19770329 1301 14253460000 19760930 19770330 1301 14253460000 19760930 19770331 1301 14253460000 19760930 19770401 1301 14253460000 19761031 19770402 1301 14253460000 19761031 19770404 1301 14253460000 19761031 19770405 1301 14253460000 19761031 19770406 1301 14253460000 19761031 19770407 1301 14253460000 19761031 19770408 1301 14253460000 19761031 19770409 1301 14253460000 19761031 19770411 1301 14253460000 19761031 19770412 1301 14253460000 19761031 19770413 1301 14253460000 19761031 19770414 1301 14253460000 19761031 19770415 1301 14253460000 19761031 19770418 1301 14253460000 19761031 19770419 1301 14253460000 19761031 19770420 1301 14253460000 19761031 19770421 1301 14253460000 19761031 19770422 1301 14253460000 19761031 19770423 1301 14253460000 19761031 19770425 1301 14253460000 19761031 19770426 1301 14253460000 19761031 19770427 1301 14253460000 19761031 19770428 1301 14253460000 19761031 19770430 1301 14253460000 19761031 19770502 1301 14253460000 19761130 19770504 1301 14253460000 19761130 19770506 1301 14253460000 19761130 19770507 1301 14253460000 19761130 19770509 1301 14253460000 19761130 19770510 1301 14253460000 19761130 19770511 1301 14253460000 19761130 19770512 1301 14253460000 19761130 19770513 1301 14253460000 19761130 19770514 1301 14253460000 19761130 19770516 1301 14253460000 19761130 19770517 1301 14253460000 19761130 19770518 1301 14253460000 19761130 19770519 1301 14253460000 19761130 19770520 1301 14253460000 19761130 19770523 1301 14253460000 19761130 19770524 1301 14253460000 19761130 19770525 1301 14253460000 19761130 19770526 1301 14253460000 19761130 19770527 1301 14253460000 19761130 19770528 1301 14253460000 19761130 19770530 1301 14253460000 19761130 19770531 1301 14253460000 19761130 19770601 1301 14253460000 19761231 19770602 1301 14253460000 19761231 19770603 1301 14253460000 19761231 19770604 1301 14253460000 19761231 19770606 1301 14253460000 19761231 19770607 1301 14253460000 19761231 19770608 1301 14253460000 19761231 19770609 1301 14253460000 19761231 19770610 1301 14253460000 19761231 19770611 1301 14253460000 19761231 19770613 1301 14253460000 19761231 19770614 1301 14253460000 19761231 19770615 1301 14253460000 19761231 19770616 1301 14253460000 19761231 19770617 1301 14253460000 19761231 19770620 1301 14253460000 19761231 19770621 1301 14253460000 19761231 19770622 1301 14253460000 19761231 19770623 1301 14253460000 19761231 19770624 1301 14253460000 19761231 19770625 1301 14253460000 19761231 19770627 1301 14253460000 19761231 19770628 1301 14253460000 19761231 19770629 1301 14253460000 19761231 19770630 1301 14253460000 19761231 19770701 1301 14253460000 19770131 19770702 1301 14253460000 19770131 19770704 1301 14253460000 19770131 19770705 1301 14253460000 19770131 19770706 1301 14253460000 19770131 19770707 1301 14253460000 19770131 19770708 1301 14253460000 19770131 19770709 1301 14253460000 19770131 19770711 1301 14253460000 19770131 19770712 1301 14253460000 19770131 19770713 1301 14253460000 19770131 19770714 1301 14253460000 19770131 19770715 1301 14253460000 19770131 19770718 1301 14253460000 19770131 19770719 1301 14253460000 19770131 19770720 1301 14253460000 19770131 19770721 1301 14253460000 19770131 19770722 1301 14253460000 19770131 19770723 1301 14253460000 19770131 19770725 1301 14253460000 19770131 19770726 1301 14253460000 19770131 19770727 1301 14253460000 19770131 19770728 1301 14253460000 19770131 19770729 1301 14253460000 19770131 19770730 1301 14253460000 19770131 19770801 1301 14253460000 19770228 19770802 1301 14253460000 19770228 19770803 1301 14253460000 19770228 19770804 1301 14253460000 19770228 19770805 1301 14253460000 19770228 19770806 1301 14253460000 19770228 19770808 1301 14253460000 19770228 19770809 1301 14253460000 19770228 19770810 1301 14253460000 19770228 19770811 1301 14253460000 19770228 19770812 1301 14253460000 19770228 19770813 1301 14253460000 19770228 19770815 1301 14253460000 19770228 19770816 1301 14253460000 19770228 19770817 1301 14253460000 19770228 19770818 1301 14253460000 19770228 19770819 1301 14253460000 19770228 19770822 1301 14253460000 19770228 19770823 1301 14253460000 19770228 19770824 1301 14253460000 19770228 19770825 1301 14253460000 19770228 19770826 1301 14253460000 19770228 19770827 1301 14253460000 19770228 19770829 1301 14253460000 19770228 19770830 1301 14253460000 19770228 19770831 1301 14253460000 19770228 19770901 1301 14253460000 19770331 19770902 1301 14253460000 19770331 19770903 1301 14253460000 19770331 19770905 1301 14253460000 19770331 19770906 1301 14253460000 19770331 19770907 1301 14253460000 19770331 19770908 1301 14253460000 19770331 ;;;;
... View more