BookmarkSubscribeRSS Feed
Guru_MG
Fluorite | Level 6

Syntax to Print Nett Sales (Monetary format) as a numeric format? 

Country        Nett Sales

Africa             $250

Asia               $300

Australia        $350

2 REPLIES 2
ballardw
Super User

If your values are currently of numeric type with a format such as Dollarw.d assigned then if you want the value without currency symbols you could use a format such as Fw.d, to display values without commas or currency, or Commaw.d to display values without currency symbol but including commas, or even something like BEST12. which would do the best job of fitting the values into 12 characters without currency symbols or commas.

 

IF your Nett Sales variable is currently a character variable then you need to convert it to numeric which would be done in a data step by creating a new variable with and input statement such as

 

data want;

    set have;

    nett_numeric = input(nett_sales,comma15.);

run;

 

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 441 views
  • 0 likes
  • 3 in conversation