I am having a hard time finding out how to drop the zeros after round. For example, i have data like 842855. After using the round function, the
data is like this 843000. however, I would like the data to show 843.
Divide by 1000?
Picture format?
I don't think 843 would be meaningful expression for 842855 after rounding. However, if you really need 3 digits number then you could divide the value (843000) by 1000, or whatever number of zeros at the end of your actual value.
data have;
a=842855;
want= round(a,1000)/1000;
proc print; run;
@A_Kh wrote:
I don't think 843 would be meaningful expression for 842855 after rounding.
At least where I work, we sometimes express dollar amounts as an integer representing thousands of dollars.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.