I have three tables, a Master calendar table, Accrued points table, and Redeemed Points table.
Users can redeem points and not accrue and vice versa.
I need to create records to fill in a data set for months where no points accrued.
EX:
Month ID
SEP -
OCT -
NOV A
Desired OutCome
Month ID
SEP A
OCT A
NOV A
You mention three input tables and show one, and don't even provide a data set name to boot.
Probably should show examples of all three.
You imply that what ever that ID might be that it could have values before a user is actually active. Is that in fact what you want?
What determines the actual value to "fill in"? Closest other value? Before? After?
I suspect you are leaving out details that are obvious to you but not mentioned while we can only use what you show us.
A trivial and almost certainly incorrect approach would be like this:
data want; set datawithmissing; id = 'A'; run;
Probably incorrect because it sets everything to 'A'. But you haven't provided any example why a value other than 'A' would appear.
Is there always only obs without missing ID? If not: please describe the rule to choose the right value.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.