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 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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