Hello all,
I have a question. Here is my original code:
data a;
input Name $ x y;
datalines;
a 1 5
b 2 8
c 3 6
d 4 7
e 5 1
;
I want to calculate sum(x) when x<3, for example. Total=3 and then put "Total" under Name, 3 under x, and the last row for y is blank. It should like:
Name x y
a 1 5
b 2 8
total 3
I thought to use compute block to solve it, but not good at it. Any suggestion is appreciated. Thanks.