This tutorial explains how to change variable type (classification) from category to measure in SAS Visual Analytics.
Question
Solution
Step I :
Question
Suppose you import a dataset in SAS Visual Analytics in which there is a numeric (continuous) variable that is stored as character (or classified as "Category"). You want to convert it to numeric ( "measure"). By default, you cannot change the variable format from "category" to "measure".
Solution
We can solve this problem by creating a new calculated data item using the PARSE function.
Step I :
Select Data >> New Calculated Item (See the image below)
SAS Visual Analytics : New Calculated Item |
Step 2 :
Enter a Name for the calculated itemStep 3 :
Enter the Parse function under the 'Text' section. In the following function, 'Order' is the variable that we want to change it from category to measure.
Parse('Order'n, 'F12.')
I have seen similar conversion from date to number being done with TreatAs function as well, see https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-age-from-birthdate-using-SAS-VA/m-p/232592#U232592
ReplyDeleteDo you know if these can be used to create calculated measures and/or categories in OLAP Cube Studio as well?
Regards,
Chad Caulkins
what is the difference between SAS LASR Server and SAS public LASR Server?
ReplyDeletePlease answer