One factor for self-service BI is ensuring that the data is easily understood by the end user. The idea of self service BI is that users with less training can build charts and reports to help them answer their questions. This does put some onus on the data creator to make sure that the data is easy to consume. In SAS Visual Analytics users are particularly keen to jump into the data and start building reports – but less experience users might need some guidance. While it seems obvious when I say it – the data needs to be labeled correctly.
Data without Labels in SAS Visual Analytics
If you load a SAS dataset into SAS Visual Analytics – it will use the assigned labels and formats for the most part. However, many developers may not take the time to assign labels or just allow the label to default to the variable name. So if the variable is called “stuff_I_like” then the label will also be “stuff_i_like” instead of something more descriptive, such as “Candy Flavors”.
It’s easy to change a label in SAS Visual Analytics, the user simply does a right-mouse click, selects Rename Variables and then provides the new name. SAS VA doesn’t lose the label, if you hover over the variable you can see the original variable name.
However, this method is inefficient if you consider it means every time the dataset is used, the user has to make the same update or all users have to make the update. Who’s to say each user will chose to call it “company”? What if they are mistaken and confuse the company to mean vendor or customer? It may really make the end report seem silly and just confuse everyone.
Updating Labels Quickly
If your data is already coming from a SAS dataset, then you can easily modify it during the ETL process to have a descriptive and meaningful label. Here’s what my dataset looks like. The inset shows the results from a Proc Contents – there are not labels assigned. There’s two methods: Datasets Procedure or during dataset creation.
Using the Datasets Procedure
If the dataset is being extracted from somewhere without modification or its especially large then you might want to use PROC DATASETS. I like this procedure because it changes the metadata without re-copying the data. It’s fast and simple. Here’s the code I used to update my dataset called Company in the Work library. Learn more about Proc Datasets from SAS Tip Sheet.
Labels During Data Creation
You can add the label with a data step or with PROC SQL. Here’s how I used each to label two of the variables. Use these techniques as a part of the dataset creation. Learn more about the LABEL statement in SAS doc set.
Checking the Results
Now when I check the results with Proc Contents – I see that my labels are there. In SAS EG, I can just hover over the variable to see the label.
Here’s the Results in SAS Visual Analytics
Now when I load the data into SAS Visual Analytics, the variables are named properly for everyone, all the time. In this example, the country variable was moved to create a Geography item and then used to create a map visualization.
In my next post I’ll show you some other ways to make your data load nicer for the end user.