I have these points (or floating points?) in column Buy In, see image below. I want to create a user defined format to change floating points tp zero because it's easier to handle them in excel.
I got the steps from this community on how to do it but it's doesn't give me what I want. Help please.
Forgot to add, these are the instructions I was given on this site:
After
creating the user-defined format, apply it to your column...
What do you mean by "change floating point to 0"? do you mean to no display the decimal part or to remove any decimal part? A format like F4.0 would not display any decimal. If you still want $ to appear then try a format like dollar6.0.
To change the value round with the Round function.
I would like to change any rows with decimal point to zero. I would I do that . Thanks
I'm not sure I understand. If the current value is 100.00 you want to display 0 or 100?
I want to the missing values which SAS display as a point. I want those missing values to display zero. Sorry for the confusion.
I don't use EG. This code generates a format that does what I think you are asking for:
proc format library=work;
value mydollar
. = '$0' /* if you don't want $ to appear then just '0'*/
other=[dollar8.2] /* what ever the current format you are using for that column goes inside [ ]*/
;
run;
Assign the MYDOLLAR format after it is created to the column(s) needed.
If you have a mixture of desired output like $ format and simple format like F4.2 you would need a separate format for each.
I followed your steps and the Program runs but I couldn't find the format in the assigned work.query dataset.
These are the codes I inputted in Program
Just the library. I would expect to get an error work.query...
The format would be the WORK library. I would expect that just going to assign format method you should be able to find MYDOLLAR in the list of available formats, or type in the name of the library.
It was helpful. Thank you.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.