I have a SAS dataset as:-
ID Month Unit
101 Jan 10.4
101 Feb 10.3
102 Jan 23
102 Feb 43
I want to create two outputs by spreading the data for each store from Jan to Dec and replaceing the values by last value and average
Expectation
101 Jan 10.4
101 Feb 10.3
. . .
. . .
101 Dec 10.3
102 Jan 23
102 Feb 43
. . .
102 Dec 43
Please give me and idea for how to write the code.
I have thot a lot using Data steps . Proc EXPAND etc but did not workout
Please suggest.
Thanks
ID Month Unit
101 Jan 10.4
101 Feb 10.3
102 Jan 23
102 Feb 43
I want to create two outputs by spreading the data for each store from Jan to Dec and replaceing the values by last value and average
Expectation
101 Jan 10.4
101 Feb 10.3
. . .
. . .
101 Dec 10.3
102 Jan 23
102 Feb 43
. . .
102 Dec 43
Please give me and idea for how to write the code.
I have thot a lot using Data steps . Proc EXPAND etc but did not workout
Please suggest.
Thanks