SAS EG: 3 Quick Tips for Working with Data

This post was kindly contributed by Business Intelligence Notes for SAS BI Users - go there to comment and to read the full post.

In 2002, I started out using BASE SAS 8 and it wasn’t until nearly two years later that I learned how to use SAS Enterprise Guide.  I quickly grew to love it.  It made it so much easier to build charts and just keep my data organized.  Today I just want to share some quick tips that I use SAS Enterprise Guide to review my data quickly.

Tip #1  Look at the Dataset

Some people don’t realize they can view the dataset in the metadata – just like you can in BASE SAS.  All you have to do it double-click and dataset is added to the Project Tree.  You can then double-click the dataset and view it.  [Not too long I discussed datasets and metadata libraries.]

sas enterprise guide view datasetTip #2: View Unique Values for a Variable

You can use PROC FREQ to see all values for a variable but that involves typing.  Sometimes I’m in the middle of a some code so I don’t want to add another program or maybe I’m just too lazy.

Select Filter and Sort on your dataset.  In the Filter tab, add the variable you want to view – for instance I needed to know the company names so I added Name as the filter, selected In a List as the filter type and clicked the … button. This caused the drop-down to appear, where I could click Add Values.    Then there is the entire list (click More Values if the list is longer).  Now I can see how the company name is spelled and can finish my code.

sas enterprise guide view all values

Tip #3: Dataset Values based on Various Filters

From the Filter and Sort window – you can also just try some different filters to see what the data contains.  Assemble the filter as you like, then click the Update button. This allows you to see the results of the data.  This can be handy when your coded filter is failing and you need to understand why.

If the Update button is not there, select the Show Preview button, which changes to Hide Preview when the Update pane is showing.

enterprise guide view the data

 

What are your best tips?

This post was kindly contributed by Business Intelligence Notes for SAS BI Users - go there to comment and to read the full post.