hi everyone,
i have a data set which has Year as measure and i need to convert it to category variable year.
Can any one help me in this.
how can i do it?
if i do it how is it going to affect my rest operations on data? what are the steps to be considered before i do this.
Any suggestion and help is much appreciated.
Thanks
Hi @sas_viclearner,
I see you are new user to the SAS community - welcome!
To change the year from a measure to a category type you simply need to do this from the data properties pane on the left side (assuming you are using SAS Visual Analytics 7.x?) Have a look at the documentation?
Year is a data type that wouldn't normally be used for statistical analysis and having it as a category type does make sense. Whether this impacts anything, really depends on how the data item is being used in other objects in your report.
If you are changing the data type only in an exploration or report then it will be only for that exploration or report. If you are changing the type in the data builder then you are changing the type for the result table and it may have a flow on effect depending on where Year is used.
Without knowing your environment and how your data item is used it is difficult to advise what the affect will be.
Kind Regards,
Michelle
you can use put function to convert numeric data to character e.g.
put(column_name, 8.);
you will no longer be able use the string year for numeric operations ..
Hi @sas_viclearner,
I see you are new user to the SAS community - welcome!
To change the year from a measure to a category type you simply need to do this from the data properties pane on the left side (assuming you are using SAS Visual Analytics 7.x?) Have a look at the documentation?
Year is a data type that wouldn't normally be used for statistical analysis and having it as a category type does make sense. Whether this impacts anything, really depends on how the data item is being used in other objects in your report.
If you are changing the data type only in an exploration or report then it will be only for that exploration or report. If you are changing the type in the data builder then you are changing the type for the result table and it may have a flow on effect depending on where Year is used.
Without knowing your environment and how your data item is used it is difficult to advise what the affect will be.
Kind Regards,
Michelle
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.