No, you have to create a new data item.
call it character expression of your numerical variable.
use the FORMAT operator and place the numerical variable inside, choose best12. for the format.
this newly created data item works in hierarchies.
I don't understand 100% your question.
BUT perhaps this may be your solution:
Depending on the context the "convert to category" option still treats the "categorical" variable as numeric preventing you from using it in a hierarchy for example.
You can overcome this by creating a categorical expression of your numerical variable by creating a calculated item "_ch_numvar" in this manner:
format(numeric_variable, best12.)
then it behaves like truly categorical
the newly created item _ch_numvar is categorical.
This is achieved by using the format operator on a numerical variable. give it a try
No, you have to create a new data item.
call it character expression of your numerical variable.
use the FORMAT operator and place the numerical variable inside, choose best12. for the format.
this newly created data item works in hierarchies.
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!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.