I have got some data like this: Attr_F1 Attr_F2 Attr_F3 obs_len want 1 2 3 3 sum( of Attr_F1 - Attr_F3) 1 2 3 2 sum( of Attr_F1 - Attr_F2) I would like to get the sum() of first several columns according to the value of the fourth column(obs_len). For example: if obs_len =2, then I would like to sum up Attr_F1 and Attr_F2, etc. Could you help me on this? Hopefully a data step to solve it. Thanks a lot.
... View more