Please share some exemplary data so we can test your code.
Btw. the message says you have missing values in your data.
All the best
Bart
@ranikeka wrote:
Hi
I am using proc sql method for percentage calculation to generate table. First column group A and second column with group B and third column with total of A and B. The following error comes up could you please help how to solve this issue.
Proc sql;
Create table bytra as select
100*round(pt1/ys,0.01) as bytrapct,
100*round(pt2/ys,0.01) as bytrapct,
100*round(pt1/123, 0.01) as bytrapct,
From file1;
Quit;
Invalid or missing arguments to the round function have caused the function to return a missing value.
Many thanks for all the help.
Your code as posted will cause a syntax ERROR because of a surplus comma, and once that is corrected, it will cause a WARNING because you try to create the same variable three times.
The NOTE about missing values is caused by your data.
Try this
Proc sql;
Create table bytra as
select
100*round(pt1/ys,0.01) as bytrapct1,
100*round(pt2/ys,0.01) as bytrapct2,
100*round(pt1/123, 0.01) as bytrapct3 /* I removed the comma here */
From file_1;
Quit;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.