this is a piece of my output. what I want to get is the difference between the value of "Diff" when "Flag" =1 and the value of "Diff" when "Flag" =0 for each "Date" as happens on line 4 where 57(flag=1) - 7 (flag=0) = 50 on 01/02/2020. The result of diff_flag comes from the following data step: data want;
set have;
by date;
diff_flag = dif(Diff);
run; Thanks in advance for your help
... View more