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

Hello!

 

I am a basic user of SAS and I have just worked out how to append two tables, however the data is too large to export.

 

I am now trying to remove and zero lines (positive and negative) using the query builder.

 

Can any one help??

 

Thanks

Linda

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

No problem 🙂 Everything has a start. Use the code below and insert the appropriate data set name and variable name

 


data want;  
   set Yourdatasethere;
   where YourVariableHere ne 0;
run;

View solution in original post

8 REPLIES 8
PeterClemmensen
Tourmaline | Level 20

Hi and welcome to the SAS communities 🙂 

 

Please define what you mean by 'zero lines'? Are these observations where some variables sum to zero or?

Doddli
Calcite | Level 5

Hello,

 

So effectively I need one large pivot with out the below zero lines as I am hoping by removing them, it will bring back all of my data

 

I have attached something to help explan

 

Thanks

Linda

PeterClemmensen
Tourmaline | Level 20

Ok. Just being curious.. Why do you want to do this in SAS? Should be fairly easy to add that filter in Excel?

Doddli
Calcite | Level 5

Hello,

 

The data that I am trying to manipulate is too large for Excel.  I don't have enough lines available 😞

 

Thanks

Linda

PeterClemmensen
Tourmaline | Level 20

Ok. Have you read the data into SAS then?

Doddli
Calcite | Level 5

I have yes.  Apologies if this a stupid question, I am new to SAS and I didn't know if it was possible or not

 

Thanks

PeterClemmensen
Tourmaline | Level 20

No problem 🙂 Everything has a start. Use the code below and insert the appropriate data set name and variable name

 


data want;  
   set Yourdatasethere;
   where YourVariableHere ne 0;
run;
Doddli
Calcite | Level 5

Thanks!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 8 replies
  • 2312 views
  • 0 likes
  • 2 in conversation