BookmarkSubscribeRSS Feed
Tushh
Calcite | Level 5

Hi,

 

I have one job which generates excel report weekly basis.

now i got assignment like i have to remove ROWS which have zero(0) value in excel report.

 

i have to delete thows rows only without deleting those colums so can i have any solution on this.

 

Note: this is sas code which executes daily basis in job& creates excel report.

Now the job is getting failled again and again just because of these zero(0) presents in particular columns so i want to delete that row which have zero(0) into their columns but i dont wanna remove columns .

 

 

Thank u

Need immediate solution

4 REPLIES 4
Kurt_Bremser
Super User

If column XXXX in a SAS dataset shall not be zero, use

if XXXX ne 0;

(subsetting if) during creation of the dataset.

If you want rows excluded from a report, use this dataset option in the data= part of the PROC statement:

(where=(XXXX ne 0))
Tushh
Calcite | Level 5

Thank U

Reeza
Super User

We don't have enough information to answer. 

 

If Excel report is generated by proc report for instance, your columns maybe a row I'm your dataset.

 

The he general premise is to add/modify your WHERE code, filtering records you are not interested in. 

 

 

ballardw
Super User

Another approach that may be feasible is presummarize data then filter before using the report procedure to format the output.

 

You will need to provide example data, procedure code and tell us which output rows are not acceptable if you want tested code.

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 4 replies
  • 1333 views
  • 0 likes
  • 4 in conversation