DATA Step, Macro, Functions and more

Replace Numeric Nulls with a Space

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Replace Numeric Nulls with a Space

Hello -

 

I am currently working with a data set that merges multiple Oracle Databases and CSVs into one .xls. 

 

In the data set, there exist both character and numeric variables. What I would like to do is replace all the "." in the numeric values to a blank "". 

 

The reason why I am doing this is because I have had a lot of issues with Tableau reading the "." as 0s, causing a lot of issues. When I manually make them a blank in the outputted .xls, this issues is avoided. 

 

I have been looking on the forums for a little while and I cannot seem to find the answer that matches my request clearly - if you know of one, please let me know. 

 

Let me know if I need to clarify anything. 

 

Thanks,

 

Jeremy

 


Accepted Solutions
Solution
‎01-17-2018 10:03 AM
Respected Advisor
Posts: 4,562

Re: Replace Numeric Nulls with a Space

Posted in reply to JMiraglia

@JMiraglia

Use OPTIONS MISSING=' '; at the beginning of your job. If this works will depend on the details of what you're doing but it's certainly worth a try.

View solution in original post


All Replies
Solution
‎01-17-2018 10:03 AM
Respected Advisor
Posts: 4,562

Re: Replace Numeric Nulls with a Space

Posted in reply to JMiraglia

@JMiraglia

Use OPTIONS MISSING=' '; at the beginning of your job. If this works will depend on the details of what you're doing but it's certainly worth a try.

New Contributor
Posts: 2

Re: Replace Numeric Nulls with a Space

This worked! Thank you so much!

Super User
Posts: 13,084

Re: Replace Numeric Nulls with a Space

Posted in reply to JMiraglia

How do you create the xls? Any way @Patrick's solution immediately before whatever export/proc you use should work.

 

Also Tableau supports SAS datasets directly so you might avoid an unneeded step with one that may well know how to understand "missing" that XLS (not even XLSX???) doesn't.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 103 views
  • 3 likes
  • 3 in conversation