SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Number of Observations in a SAS Dataset

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

Number of Observations in a SAS Dataset


Hello,

I'd like to easily validate the total number of observations in my datasets after it is opened in AOM for Excel. I see where metadata is provided for the columns in the dataset, but I don't see where the total number of rows is displayed.

I know I can run a simple procedure to get the row count, but I'd prefer a quicker way for our users to validate the size of the SAS dataset before proceeding with their analysis. we are  using AOM 6.1

Thanks!


Accepted Solutions
Solution
‎08-24-2015 10:01 AM
Contributor
Posts: 22

Re: Number of Observations in a SAS Dataset

I found a point and click way to do it. Tasks > Data > Data Set Attributes

The task produces a nice summary meta data report including number of observations. It will embed the report into another worksheet which is very nice to have when sending the report to others who may need to reproduce the results.

View solution in original post


All Replies
Esteemed Advisor
Posts: 6,646

Re: Number of Observations in a SAS Dataset

The first thing that came to my mind was to create a stored process that outputs the data and then appends a line with the totals, so you get the totals as an additional line in Excel.

Another method might be to insert a function in Excel before the cell where you start importing, that checks for the last used cell and displays it's line number.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 22

Re: Number of Observations in a SAS Dataset

Thanks Kurt for the suggestions. We are rolling out AOM to 400 SAS users in our company, all are on the SAS Grid platform. It is not unusual for us to have datasets with greater than a million rows. We are telling our users not to load these large files into Excel, but to run tasks on the Grid. SAS provides one click access to metadata on the SAS variables but surprisingly no data on the size of the dataset. I thought I was missing something obvious. Lacking that,  I'll direct our users to run one of the descriptive statistical task to verify they are working with a complete dataset.

Esteemed Advisor
Posts: 6,646

Re: Number of Observations in a SAS Dataset

Another method: create a list of your SAS tables and put it up on the SAS server's apache (or whatever HTTP server you use). Update that list appropriately, so it reflects the current dataset sizes.

I do something similar (slightly more complicated) to keep users informed of their disk usage in shared volumes.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎08-24-2015 10:01 AM
Contributor
Posts: 22

Re: Number of Observations in a SAS Dataset

I found a point and click way to do it. Tasks > Data > Data Set Attributes

The task produces a nice summary meta data report including number of observations. It will embed the report into another worksheet which is very nice to have when sending the report to others who may need to reproduce the results.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 1101 views
  • 0 likes
  • 2 in conversation