SAS Visual Analytics : Change Variable Classification

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

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*

Related Posts:

1 Response 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

Next → ← Prev