BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sas_viclearner
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

View solution in original post

2 REPLIES 2
ali_jooan
Obsidian | Level 7

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 ..

MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 2 replies
  • 1959 views
  • 1 like
  • 3 in conversation