I have a numeric column like this-
Col A
100%
100%
0%
0%
100%
0%
I am trying to convert it into character format for which I am using the following code -
put(t1."Col A"n, 10.)
From which I am getting this output -
Col A
1
1
0
0
1
0
Why am I getting this output?
The PERCENT. format multiplies the value by 100 before displaying it. The raw value of 100 % is always 1.
What string do you expect from a value like this:
data have;
input col_a;
format col_a percent6.;
datalines;
1
;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.