What's the easiest way to create monthly dummy variables in SAS Enterprise Guide? I already have a monthly variable 1-12. Thanks!
Ah, with your clarification it's even a bit easier than my original. You have a "Month" var that is set to 1 thru 12 already?
You want to create "monthly dummy variables" but then you say "I already have monthly dummy variables".
I don't understand the request.
Sorry, I just corrected. I have a monthly variable.
I know how to do it using query builder to recode the monthly variable column 11 different times. Surely there is something easier.
Something like this?

claireluen wrote:
I know how to do it using query builder to recode the monthly variable column 11 different times. Surely there is something easier.
I don't know if this is available through Enterprise Guide, but the easiest way I know of the create dummy variables is PROC GLMMOD.
Ah, with your clarification it's even a bit easier than my original. You have a "Month" var that is set to 1 thru 12 already?
And if you want a more "query-friendly" method, create a 12-row reference table (one for each month value). Example DATA step:
Perfect, thanks.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.