Hi SAS Community, I have 2 datasets. The wide data set has customer sales data by week with column names i.e. Cust_ID, wk_001, wk_002, etc. and the narrow dataset holds the actual week date with column name Col_label. See below for examples. I tried to transpose the wide dataset so the WK_001, WK_002, etc columns are now values and the variable name is Date. Additionally, I want to rename the values in the new "Date" column with the values in the narrow data set column "Col_label". proc transpose data=wide out=long;
by cust_id;
var wk_001-wk_xx;
run; Narrow Data Typ Column Col_label Weekly WK_001 Sep_17_08 Weekly WK_002 Sep_17_01 Wide Data Cust_ID WK_001 WK_002 1001 $$ $$ Essentially, the new data set will look like: New data set Cust_ID Date Sales 1001 Sep_17_08 $$ 1001 Sep_17_01 $$ Thanks in advance for your help!
... View more