BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
pavank
Quartz | Level 8
proc freq data=sashelp.cars;
tables make*origin/norow nocol nopercent nocum sparse;
run;

Hi Experts,

I want to get only zero values from sashelp.cars using proc freq make and origin wise from above code not give zero values 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Check the "WANT" table generated by my code.

 

Ksharp_0-1722411384128.png

 

View solution in original post

3 REPLIES 3
Ksharp
Super User

Post the desired output you are looking for.

Check 'WANT' table whether it is the output you want or not ?

 

proc freq data=sashelp.cars noprint;
tables make*origin/norow nocol nopercent nocum sparse out=want(where=(COUNT=0)) ;
run;

 

pavank
Quartz | Level 8
Make	Origin	Frequency
Acura	Europe	0
Acura	USA	0
Audi	Asia	0
Audi	USA	0
BMW	Asia	0
BMW	USA	0
Buick	Asia	0
Buick	Europe	0
Cadillac	Asia	0
Cadillac	Europe	0
Chevrolet	Asia	0
Chevrolet	Europe	0
Chrysler	Asia	0
Chrysler	Europe	0
Dodge	Asia	0
Dodge	Europe	0
Ford	Asia	0
Ford	Europe	0
GMC	Asia	0
GMC	Europe	0
Honda	Europe	0
Honda	USA	0
Hummer	Asia	0
Hummer	Europe	0
Hyundai	Europe	0
Hyundai	USA	0
Infiniti	Europe	0
Infiniti	USA	0
Isuzu	Europe	0
Isuzu	USA	0
Jaguar	Asia	0
Jaguar	USA	0
Jeep	Asia	0
Jeep	Europe	0
Kia	Europe	0
Kia	USA	0
Land Rover	Asia	0
Land Rover	USA	0
Lexus	Europe	0
Lexus	USA	0
Lincoln	Asia	0
Lincoln	Europe	0
MINI	Asia	0
MINI	USA	0
Mazda	Europe	0
Mazda	USA	0
Mercedes-Benz	Asia	0
Mercedes-Benz	USA	0
Mercury	Asia	0
Mercury	Europe	0
Mitsubishi	Europe	0
Mitsubishi	USA	0
Nissan	Europe	0
Nissan	USA	0
Oldsmobile	Asia	0
Oldsmobile	Europe	0
Pontiac	Asia	0
Pontiac	Europe	0
Porsche	Asia	0
Porsche	USA	0
Saab	Asia	0
Saab	USA	0
Saturn	Asia	0
Saturn	Europe	0
Scion	Europe	0
Scion	USA	0
Subaru	Europe	0
Subaru	USA	0
Suzuki	Europe	0
Suzuki	USA	0
Toyota	Europe	0
Toyota	USA	0
Volkswagen	Asia	0
Volkswagen	USA	0
Volvo	Asia	0
Volvo	USA	0
Ksharp
Super User

Check the "WANT" table generated by my code.

 

Ksharp_0-1722411384128.png

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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