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

I'm working with Proc Freq, but this question can extend beyond that.

 

How best to subset the data for the analysis one wants to do?

 

For instance, say there is a column of data called "Quality", and it extends from 0 to 10.  And I would like to only focus on the rows of data with Quality >= 8.0.

 

So in Proc Freq, ONLY focus on that subset of data.

 

How best to do this?

 

Thanks,

Nicholas Kormanik

 

 

1 ACCEPTED SOLUTION
2 REPLIES 2
NKormanik
Barite | Level 11

@Kurt_Bremser wrote:

Use a WHERE Statement or a WHERE= Data Set Option.


In PROC Steps

You can use the WHERE statement with any SAS procedure that reads a SAS data set. The WHERE statement is useful in order to subset the original data set for processing by the procedure.

Odd no example was provided with a Proc.  Only Data.

 

Would indeed be useful to easily run Proc Freq on various sub-parts of a data set.

 

Thanks @Kurt_Bremser 

 

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 25. 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
  • 2 replies
  • 526 views
  • 1 like
  • 2 in conversation