BookmarkSubscribeRSS Feed
u61361493
Calcite | Level 5

Read sashelp.shoes as input.
• Create a new SAS data set, work.shoerange.
• Create a new character variable SalesRange that will be used to categorize the observations into
three groups.
• Set the value of SalesRange to the following:
o Lower when Sales are less than $100,000.
o Middle when Sales are between $100,000 and $200,000, inclusively.
o Upper when Sales are above $200,000.

 

run this programme.

3 REPLIES 3
Quentin
Super User

While many people here are happy to help students working on homework questions, it will work better if you show the code you have tried, and describe the problems you are having (are there errors in the log? are you surprised/confused by the results?) 

andreas_lds
Jade | Level 19

What have you tried so far?

Cynthia_sas
Diamond | Level 26
Hi:
I agree with the suggestions from @Quentin. Please show the code you've tried and explain why you think it is or is not correct. As a hint, did your professor do any coverage of SAS formats as a way to show numeric values in categories? That's one way to do what you want. The other way is for you to create a completely new variable, probably a character variable, using IF statements or other conditional logic.
Cynthia

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 3 replies
  • 1001 views
  • 1 like
  • 4 in conversation