Hi everyone,
I'm quite new to SAS Enterprise Guide and I would like to clean up my data before analysis.
I have a variable OnlineCustomer that uses 3 possible ways to be TRUE and 2 ways to be FALSE.
null, -1 and 0 should be FALSE
1 or [the customerID] should be TRUE
How can I convert al the values to the correct TRUE/FALSE-value so I can easily work with expressions?
Thanks,
David
In SAS you can recode the variables in a task I believe OR you could create a custom format and then use the data as is, if you needed it further.
EDIT:
To recode:
Use query builder>Computed Column> check the RECODE radio button
For Format, it is under Tasks>Data>Create Format
In SAS you can recode the variables in a task I believe OR you could create a custom format and then use the data as is, if you needed it further.
EDIT:
To recode:
Use query builder>Computed Column> check the RECODE radio button
For Format, it is under Tasks>Data>Create Format
If you're using the query wizard, you can add a computed column either via the recode as described or if you're feeling adventurous create one using the advanced option and name it bolOnlineCustomer. The formula would be something like:
Onlinecustomer=1 or OnlineCustomer=[the customerid].
If either of those are true, the formula returns a true. I'm presuming that your customerid's are all numeric
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.