![]() |
|
#251
|
||||
|
||||
![]() Quote:
To get your match values you'd want to create a table of those records which don't have blanks, then sort by descending date and then dedupe on member ID. Then your other table is just a dataset of those who had blanks. Then match across your values from one table to the next to fill in your second table's blanks (being careful to drop extra variables in the first table so as not to overwrite them in the second). Then recreate your original table by setting together those who originally did not have blanks and those who had blanks but now don't. |
#252
|
||||
|
||||
![]() This is somewhat clunky but should work
Code:
data your_data2; set your_data; format unit_fill 8.4; format mcd_fill $1.; if unit_factor = . then unit_factor = unit_fill; if medicaid_flag = . then medicaid_flag = mcd_fill; mcd_fill = medicaid_flag; unit_fill = unit_factor; retain mcd_fill unit_fill; drop mcd_fill unit_fill; run;
__________________
|
#253
|
||||
|
||||
![]() I wouldn't say clunky, just easy button. Thanks
This is what I tried but forgot the RETAIN I hope this works
__________________
Spoiler: |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|