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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 803 views
  • 0 likes
  • 4 in conversation