BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
luvscandy27
Quartz | Level 8

 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.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Divide by 1000?

 

Picture format?

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Divide by 1000?

 

Picture format?

--
Paige Miller
A_Kh
Barite | Level 11

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; 
PaigeMiller
Diamond | Level 26

@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.

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1194 views
  • 0 likes
  • 3 in conversation