Hi Everyone,
I have a proc sql table that outputs the dataset below:
proc sql;
create table testtable as
select sum(numerator) as n,
sum(denominator1) as d1,
sum(denominator2) as d2,
sum(denominator3) as d3,
sum(denominator4) as d4
from work.responserate_sex;
quit;
Which outputs as:
n | d1 | d2 | d3 | d4 |
93 | 66 | . | 3 | . |
I am trying to create a new variable called result which would be written as
result = n / ((d1 + d2) - (d3) + (d4))
data testtable;
set testtable;
result = n / ((d1 + d2) - (d3) + (d4));
run;
this outputs a blank cell for the new variable result and I'm not sure why. Can anyone help me out as to why this may be the case?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: