SAS Visual Analytics : Change Variable Classification

Deepanshu Bhalla 2 Comments
This tutorial explains how to change variable type (classification) from category to measure in SAS Visual Analytics.

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 item
Step 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.')
Change Variable Classification

Related Posts
Spread the Word!
Share
About Author:
Deepanshu Bhalla

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 10 years of experience in data science. During his tenure, he worked with global clients in various domains like Banking, Insurance, Private Equity, Telecom and HR.

Post Comment 2 Responses to "SAS Visual Analytics : Change Variable Classification"
  1. 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

    Do you know if these can be used to create calculated measures and/or categories in OLAP Cube Studio as well?

    Regards,

    Chad Caulkins

    ReplyDelete
  2. what is the difference between SAS LASR Server and SAS public LASR Server?

    Please answer

    ReplyDelete
Next → ← Prev