Solved
Contributor
Posts: 72

# how to delete zero and negative value from a column

how i can delete zero values and negative values from a column in a data. Thanks.

Accepted Solutions
Solution
‎06-17-2016 02:08 AM
Super Contributor
Posts: 355

## Re: how to delete zero and negative value from a column

Posted in reply to Jahanzaib

For example:

``````Data A (Where=(X gt 0));
Do i=1 To 100;
X=Round(Rannor(1)-0.5,0.1);
Output;
End;
Run;``````

All Replies
Solution
‎06-17-2016 02:08 AM
Super Contributor
Posts: 355

## Re: how to delete zero and negative value from a column

Posted in reply to Jahanzaib

For example:

``````Data A (Where=(X gt 0));
Do i=1 To 100;
X=Round(Rannor(1)-0.5,0.1);
Output;
End;
Run;``````
Occasional Contributor
Posts: 11

## Re: how to delete zero and negative value from a column

Posted in reply to user24feb

Wouldn't this just delete those observations instead of just the values for that observation in the column? Why not something like:

if var1 <= 0 then var1 = .;

Can you explain the difference for answering the original post?

🔒 This topic is solved and locked.

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

Discussion stats
• 2 replies
• 516 views
• 1 like
• 3 in conversation