BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hhchenfx
Rhodochrosite | Level 12

Hi Everyone,

I have a column out which contain only value 1, 0,-1 based on IF THEN ELSE statement.

Then, I use proc expand to calculate moving sum and the output has -0 (in scientific format). 

I can kill the -0 with INT() but my program has hundred of column like that. Thus it is better that I solve the issue inside the proc expand.

Can you please help?

Thanks,

HHC

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Change the conversion method to something other than the default (SPLINE). Try METHOD=STEP, for example.

PG

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

First, you could change the format of all of these variables such that –0 will appear as zero. Although I am surprised that a sum of integers would give a –0, and I am thinking perhaps you haven't really described everything going on.

 

If that's not it, you could write an ARRAY to perform whatever task you want on all variables.

--
Paige Miller
PGStats
Opal | Level 21

Change the conversion method to something other than the default (SPLINE). Try METHOD=STEP, for example.

PG
hhchenfx
Rhodochrosite | Level 12

Thanks a lot!

It works.

HHC

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
  • 1234 views
  • 1 like
  • 3 in conversation