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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.