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
;
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 save with the early bird rate—just $795!
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.