Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE

Size: px
Start display at page:

Download "Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE"

Transcription

1 ABSTRACT Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE Steve Cavill, NSW Bureau of Crime Statistics and Research, Sydney, Australia PROC TABULATE is a great tool for generating cross tab style reports. It's very flexible but has a few little limitations. One is suppressing superfluous subtotals. The ALL keyword creates a total or subtotal for the categories in one dimension. However, if there is only one category in the dimension, the subtotal is still shown, which is really just repeating the detail line again. This can look a bit confusing in the final output. This talk demonstrates a method to suppress those superfluous totals by saving the output from PROC TABULATE using the OUT= option. That data set is then reprocessed to remove the undesirable totals using the _TYPE_ variable which identifies the total rows. PROC TABULATE is then run again against the reprocessed data set to create the final table. INTRODUCTION PROC TABULATE is one of the most commonly used reporting procedures in SAS and has very powerful summary and output capabilities. Sometimes PROC TABULATE does almost, but not quite, exactly what you want. One of the possibly less used options of PROC TABULATE is the OUT= option to send the output of the procedure to a data set. Using the OUT= option can enable you to take the standard output of PROC TABULATE and post process that output to create exactly what you want. This paper shows one example of modifying PROC TABULATE standard output by post processing the output data set to suppress superfluous subtotals if they are not desired. The general technique of manipulating the output data set to get the exact output you want can be extended to most situations where you want to alter the standard output. The examples in this paper are based on the SAS supplied sample data set SASHELP.CARS. (I have subset the CARS dataset to three makes only to simplify the output). The complete sample program to create all the output in this paper is included in the appendix. 1

2 PROC TABULATE SUBTOTALS The ALL= keyword of PROC TABULATE creates subtotals, for example, this code: proc tabulate data=data format=6. class origin make type var msrp tables origin *(make*(type all) all) all='grand Total',n msrp*mean*f=dollar7. produces the output in Figure 1 Because there is only one type of vehicle from Asia the same detail line appears three times. Similarly, for Jeep, there is only one vehicle type so the subtotal for Jeep is the same as the detail line. It can make the output look cleaner if those subtotals are suppressed, so subtotals only appear if there is more than one detail line in the category, as shown in Figure 2. Figure 2 also shows we have changed the default label of the subtotal to include the data label. PROC TABULATE allows you to change the default text All to any label you want, but it s static text and doesn t include the data value for the category. You can see this in the sample program where all='grand Total' has changed the label on the Grand Total line Figure 2: Modified output Figure 1: Standard output PROCEDURE The steps to create the desired output are as follows STEP 1 : OUTPUT THE TABULATE OUTPUT TO A SAS DATA SET proc tabulate data=data out=table format=6. The output data set looks like this: 2

3 Figure 3: Output data set The _TYPE_ column defines what type of row we are looking at. A 1 in position n means that class variable is included in that summary row. The positions are based on the order of the class variables in the class statement. So: 111 means all class variables are part of that row so in our table that s the rows for Origin, make and type effectively our detail rows 110 means the row contains Origin and Make, and is the summary of all Type s for that Origin and Make 100 are the totals for Origin 000 is the grand total STEP 2 REMOVE THE SUBTOTALS WE DON T WANT The subtotals we want to remove have been highlighted in Figure 3 above. These are the Make subtotals for Isuzu and Ford, and the Origin total for Asia (as highlighted in Figure 1). Obviously we don t want to hardcode these data values, as the categories to suppress will change as the data changes. What identifies those categories is that, firstly they are total lines, and secondly there is only one item in that category. i.e. there is only one Type of vehicle for Isuzu and Jeep, and there is only one Make within Asia. We can easily use SQL or PROC FREQ or SUMMARY to find these categories. Here is using SQL: proc sql create table make_suppress as select make,count (distinct type) as freq from data group by make having count (distinct type)=1 /* only one type within the make*/ create table origin_suppress as select origin,count (distinct make) as freq from data group by origin having count (distinct make)=1 /* only one make in the origin */ 3

4 quit This creates the tables below. We could also have created macro variables instead, which is really just a matter of preference. I find tables can make it easier to report on what has been done. Make freq Isuzu 1 Jeep 1 Output 1. Listing of make_suppress Origin freq Asia 1 Output 2. Listing of origin_suppress Now we can delete those rows and change the values of the labels as desired data table /* the default label widths are not wide enough to hold the desired total label */ length origin make type $20 set table /* first change the total labels (which are blank in the output data set */ if _type_='000' then origin='grand Total' /*grand total*/ /*origin total - include the value of Origin on the total line */ if _type_='100' then make=catx(' ',origin,'total') /*make total - include the value of Make on the total line */ if _type_='110' then type=catx(' ',make,'total') proc sql /*now delete the total lines where there is only one category in that dimension*/ delete from table where _type_='110' and make in (select make from make_suppress) /* will delete Jeep and Isuzu totals */ delete from table where _type_='100' and origin in (select origin from origin_suppress) /* will delete Asia subtotal */ quit The output data set now has only the rows we want to display, and has total labels modified to show the labels we want, including the data value of the relevant category. 4

5 USE PROC TABULATE TO SHOW THE FINAL TABLE /* now create the final table /* - we don't need totals because they are in the input data set, /* and the cell value is the sum of N and msrp_sum, /* where N and msrp_sum were calculated in the previous tabulate */ proc tabulate data=table format=6. class origin make type/order=data missing /* totals have missing in the subcategory*/ var N msrp_mean /* N and msrp_mean were calculated in the previous tabulate so just show it */ tables origin*make*type, N*sum msrp_mean*sum*f=dollar7. Notes on the code The all= keywords have all been removed, as don t need to calculate totals, because the output dataset already has the totals calculated by the first run of PROC TABULATE. The name of the msrp variable now contains the suffix _mean, because that is the statistic we asked for in the first PROC TABULATE. We need the missing option on the class statement, because the subtotal rows have blank values in the subcategory column We use the order= option on the class statement because the output dataset is already in the desired order. If we don t use the order=data option the subtotals will be re-sorted into alphabetical order rather than the totals appearing at the bottom. We use the sum statistic, as there is only one row per category so we can just sum the value (which is the same as the value itself) CONCLUSION The example uses a specific class statement to simplify the demonstration. This code can easily be generalized into a macro that takes the class statement as input. This macro is included in the appendix. 5

6 The out= option is supported by most SAS reporting procedures. The technique of reprocessing the out= data set can be used in lots cases where you want to modify the standard SAS output. CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Steve Cavill NSW Bureau of Crime Statistics and Research 20 Lee Street Sydney, NSW, SAS Community Page: This and other presentations can be found at my SAS Community presentations page SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies. 6

7 APPENDIX Source code to reproduce the examples in this paper. The sample data set is a standard data set that is part of your SAS installation data data /* subset the data to make illustration simpler */ set sashelp.cars where make in ('Isuzu','Jeep','Ford') /* create the desired tabulate table and output to a sas data set */ proc tabulate data=data out=table format=6. class origin make type var msrp tables origin *(make*(type all) all) all='grand Total',n msrp*mean*f=dollar7./ /*find the dimensions that have only one category*/ proc sql create table make_suppress as select make,count (distinct type) as freq from data group by make having count (distinct type)=1 /* only one type within the make*/ create table origin_suppress as select origin,count (distinct make) as freq from data group by origin having count (distinct make)=1 /* only one make in the origin */ quit data table length origin make type $20 /* the default label widths are not wide enough to hold the desired total label */ set table /* first change the total labels (which are blank in the output data set */ if _type_='000' then origin='grand Total' /*grand total*/ if _type_='100' then make=catx(' ',origin,'total') /*origin total - include the value of Origin on the total line */ if _type_='110' then type=catx(' ',make,'total') /*make total - include the value of Make on the total line */ proc sql /*now delete the total lines where there is only one category in that dimension*/ delete from table where _type_='110' and make in (select make from make_suppress) /* will delete Jeep and Isuzu totals */ delete from table where _type_='100' and origin in (select origin from origin_suppress) /* will delete Asia subtotal */ quit /* now create the final table 7

8 /* - we don't need totals because they are in the input data set, /* and the cell value is the sum of N and msrp_sum, where N and msrp_sum were calculated in the previous tabulate */ proc tabulate data=table format=6. class origin make type/order=data missing /* totals have missing in the subcategory*/ label origin='origin' make='make' type='type' var N msrp_mean /* N and msrp were calculated in the previous tabulate so just show it */ tables origin*make*type, N*sum msrp_mean*sum*f=dollar7. 8

Microsoft Access Illustrated. Unit B: Building and Using Queries

Microsoft Access Illustrated. Unit B: Building and Using Queries Microsoft Access 2010- Illustrated Unit B: Building and Using Queries Objectives Use the Query Wizard Work with data in a query Use Query Design View Sort and find data (continued) Microsoft Office 2010-Illustrated

More information

Getting it Done with PROC TABULATE

Getting it Done with PROC TABULATE ABSTRACT Getting it Done with PROC TABULATE Michael J. Williams, ICON Clinical Research, San Francisco, CA The task of displaying statistical summaries of different types of variables in a single table

More information

Uncommon Techniques for Common Variables

Uncommon Techniques for Common Variables Paper 11863-2016 Uncommon Techniques for Common Variables Christopher J. Bost, MDRC, New York, NY ABSTRACT If a variable occurs in more than one data set being merged, the last value (from the variable

More information

Extending the Scope of Custom Transformations

Extending the Scope of Custom Transformations Paper 3306-2015 Extending the Scope of Custom Transformations Emre G. SARICICEK, The University of North Carolina at Chapel Hill. ABSTRACT Building and maintaining a data warehouse can require complex

More information

Producing Summary Tables in SAS Enterprise Guide

Producing Summary Tables in SAS Enterprise Guide Producing Summary Tables in SAS Enterprise Guide Lora D. Delwiche, University of California, Davis, CA Susan J. Slaughter, Avocet Solutions, Davis, CA ABSTRACT This paper shows, step-by-step, how to use

More information

Using SAS/SCL to Create Flexible Programs... A Super-Sized Macro Ellen Michaliszyn, College of American Pathologists, Northfield, IL

Using SAS/SCL to Create Flexible Programs... A Super-Sized Macro Ellen Michaliszyn, College of American Pathologists, Northfield, IL Using SAS/SCL to Create Flexible Programs... A Super-Sized Macro Ellen Michaliszyn, College of American Pathologists, Northfield, IL ABSTRACT SAS is a powerful programming language. When you find yourself

More information

Run your reports through that last loop to standardize the presentation attributes

Run your reports through that last loop to standardize the presentation attributes PharmaSUG2011 - Paper TT14 Run your reports through that last loop to standardize the presentation attributes Niraj J. Pandya, Element Technologies Inc., NJ ABSTRACT Post Processing of the report could

More information

What just happened? A visual tool for highlighting differences between two data sets

What just happened? A visual tool for highlighting differences between two data sets ABSTRACT What just happened? A visual tool for highlighting differences between two data sets Steve Cavill, NSW Bureau of Crime Statistics and Research, Sydney, Australia Base SAS includes a great utility

More information

New Perspectives on Microsoft Excel Module 5: Working with Excel Tables, PivotTables, and PivotCharts

New Perspectives on Microsoft Excel Module 5: Working with Excel Tables, PivotTables, and PivotCharts New Perspectives on Microsoft Excel 2016 Module 5: Working with Excel Tables, PivotTables, and PivotCharts Objectives, Part 1 Explore a structured range of data Freeze rows and columns Plan and create

More information

Statistics, Data Analysis & Econometrics

Statistics, Data Analysis & Econometrics ST009 PROC MI as the Basis for a Macro for the Study of Patterns of Missing Data Carl E. Pierchala, National Highway Traffic Safety Administration, Washington ABSTRACT The study of missing data patterns

More information

Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts. Microsoft Excel 2013 Enhanced

Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts. Microsoft Excel 2013 Enhanced Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts Microsoft Excel 2013 Enhanced Objectives Explore a structured range of data Freeze rows and columns Plan and create an Excel table Rename

More information

Using PROC SQL to Generate Shift Tables More Efficiently

Using PROC SQL to Generate Shift Tables More Efficiently ABSTRACT SESUG Paper 218-2018 Using PROC SQL to Generate Shift Tables More Efficiently Jenna Cody, IQVIA Shift tables display the change in the frequency of subjects across specified categories from baseline

More information

It s Proc Tabulate Jim, but not as we know it!

It s Proc Tabulate Jim, but not as we know it! Paper SS02 It s Proc Tabulate Jim, but not as we know it! Robert Walls, PPD, Bellshill, UK ABSTRACT PROC TABULATE has received a very bad press in the last few years. Most SAS Users have come to look on

More information

Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint

Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint PharmaSUG 2018 - Paper DV-01 Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint Jane Eslinger, SAS Institute Inc. ABSTRACT An output table is a square. A slide

More information

Data Manipulation with SQL Mara Werner, HHS/OIG, Chicago, IL

Data Manipulation with SQL Mara Werner, HHS/OIG, Chicago, IL Paper TS05-2011 Data Manipulation with SQL Mara Werner, HHS/OIG, Chicago, IL Abstract SQL was developed to pull together information from several different data tables - use this to your advantage as you

More information

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency.

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency. Paper 76-28 Comparative Efficiency of SQL and Base Code When Reading from Database Tables and Existing Data Sets Steven Feder, Federal Reserve Board, Washington, D.C. ABSTRACT In this paper we compare

More information

BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI

BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI Paper BI09-2012 BI-09 Using Enterprise Guide Effectively Tom Miron, Systems Seminar Consultants, Madison, WI ABSTRACT Enterprise Guide is not just a fancy program editor! EG offers a whole new window onto

More information

Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West

Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West Chapter 10 Managing Numbers and Text Using Excel 1 Objectives Examine the Excel window and tools Enter and format

More information

Using GSUBMIT command to customize the interface in SAS Xin Wang, Fountain Medical Technology Co., ltd, Nanjing, China

Using GSUBMIT command to customize the interface in SAS Xin Wang, Fountain Medical Technology Co., ltd, Nanjing, China PharmaSUG China 2015 - Paper PO71 Using GSUBMIT command to customize the interface in SAS Xin Wang, Fountain Medical Technology Co., ltd, Nanjing, China One of the reasons that SAS is widely used as the

More information

Anyone Can Learn PROC TABULATE, v2.0

Anyone Can Learn PROC TABULATE, v2.0 Paper 63-25 Anyone Can Learn PROC TABULATE, v2.0 Lauren Haworth Ischemia Research & Education Foundation San Francisco ABSTRACT SAS Software provides hundreds of ways you can analyze your data. You can

More information

Tips for Mastering Relational Databases Using SAS/ACCESS

Tips for Mastering Relational Databases Using SAS/ACCESS Tips for Mastering Relational Databases Using SAS/ACCESS SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other

More information

Excel 2007/2010. Don t be afraid of PivotTables. Prepared by: Tina Purtee Information Technology (818)

Excel 2007/2010. Don t be afraid of PivotTables. Prepared by: Tina Purtee Information Technology (818) Information Technology MS Office 2007/10 Users Guide Excel 2007/2010 Don t be afraid of PivotTables Prepared by: Tina Purtee Information Technology (818) 677-2090 tpurtee@csun.edu [ DON T BE AFRAID OF

More information

ABSTRACT INTRODUCTION MACRO. Paper RF

ABSTRACT INTRODUCTION MACRO. Paper RF Paper RF-08-2014 Burst Reporting With the Help of PROC SQL Dan Sturgeon, Priority Health, Grand Rapids, Michigan Erica Goodrich, Priority Health, Grand Rapids, Michigan ABSTRACT Many SAS programmers need

More information

How to Use ARRAYs and DO Loops: Do I DO OVER or Do I DO i? Jennifer L Waller, Medical College of Georgia, Augusta, GA

How to Use ARRAYs and DO Loops: Do I DO OVER or Do I DO i? Jennifer L Waller, Medical College of Georgia, Augusta, GA Paper HOW-001 How to Use ARRAYs and DO Loops: Do I DO OVER or Do I DO i? Jennifer L Waller, Medical College of Georgia, Augusta, GA ABSTRACT Just the mention of ARRAYs and DO loops is enough to make a

More information

USING PROC TABULATE AND LAG(n) FUNCTION FOR RATES OF CHANGE Khoi To, Office of Planning and Decision Support, Virginia Commonwealth University

USING PROC TABULATE AND LAG(n) FUNCTION FOR RATES OF CHANGE Khoi To, Office of Planning and Decision Support, Virginia Commonwealth University SAS 5581-2016 USING PROC TABULATE AND LAG(n) FUNCTION FOR RATES OF CHANGE Khoi To, Office of Planning and Decision Support, Virginia Commonwealth University ABSTRACT For SAS users, PROC TABULATE and PROC

More information

Print the Proc Report and Have It on My Desktop in the Morning! James T. Kardasis, J.T.K. & Associates, Skokie, IL

Print the Proc Report and Have It on My Desktop in the Morning! James T. Kardasis, J.T.K. & Associates, Skokie, IL Print the Proc Report and Have It on My Desktop in the Morning! James T. Kardasis, J.T.K. & Associates, Skokie, IL ABSTRACT The user will learn how to produce detail and summary reports as well as frequency

More information

ASMC Professional Development Institute, Anaheim, CA. Teksouth Corp.

ASMC Professional Development Institute, Anaheim, CA. Teksouth Corp. PivotTable Power For You! A Guide to Powerful Data Analysis in Microsoft Excel ASMC Professional Development Institute, Anaheim, CA May 27, 2012 Paul Friedman, CDFM Teksouth Corp. Paul.Friedman.ctr@hq.southcom.mil

More information

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide Paper 809-2017 Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide ABSTRACT Marje Fecht, Prowerk Consulting Whether you have been programming in SAS for years, are new to

More information

A Quick and Gentle Introduction to PROC SQL

A Quick and Gentle Introduction to PROC SQL ABSTRACT Paper B2B 9 A Quick and Gentle Introduction to PROC SQL Shane Rosanbalm, Rho, Inc. Sam Gillett, Rho, Inc. If you are afraid of SQL, it is most likely because you haven t been properly introduced.

More information

The Proc Transpose Cookbook

The Proc Transpose Cookbook ABSTRACT PharmaSUG 2017 - Paper TT13 The Proc Transpose Cookbook Douglas Zirbel, Wells Fargo and Co. Proc TRANSPOSE rearranges columns and rows of SAS datasets, but its documentation and behavior can be

More information

How to Set up a Budget Advanced Excel Part B

How to Set up a Budget Advanced Excel Part B How to Set up a Budget Advanced Excel Part B A budget is probably the most important spreadsheet you can create. A good budget will keep you focused on your ultimate financial goal and help you avoid spending

More information

SAS Studio: A New Way to Program in SAS

SAS Studio: A New Way to Program in SAS SAS Studio: A New Way to Program in SAS Lora D Delwiche, Winters, CA Susan J Slaughter, Avocet Solutions, Davis, CA ABSTRACT SAS Studio is an important new interface for SAS, designed for both traditional

More information

ODS for PRINT, REPORT and TABULATE

ODS for PRINT, REPORT and TABULATE ODS for PRINT, REPORT and TABULATE Lauren Haworth, Genentech, Inc., San Francisco ABSTRACT For most procedures in the SAS system, the only way to change the appearance of the output is to change or modify

More information

Paper PS05_05 Using SAS to Process Repeated Measures Data Terry Fain, RAND Corporation Cyndie Gareleck, RAND Corporation

Paper PS05_05 Using SAS to Process Repeated Measures Data Terry Fain, RAND Corporation Cyndie Gareleck, RAND Corporation Paper PS05_05 Using SAS to Process Repeated Measures Data Terry Fain, RAND Corporation Cyndie Gareleck, RAND Corporation ABSTRACT Data that contain multiple observations per case are called repeated measures

More information

Using Templates Created by the SAS/STAT Procedures

Using Templates Created by the SAS/STAT Procedures Paper 081-29 Using Templates Created by the SAS/STAT Procedures Yanhong Huang, Ph.D. UMDNJ, Newark, NJ Jianming He, Solucient, LLC., Berkeley Heights, NJ ABSTRACT SAS procedures provide a large quantity

More information

Using Proc Freq for Manageable Data Summarization

Using Proc Freq for Manageable Data Summarization 1 CC27 Using Proc Freq for Manageable Data Summarization Curtis Wolf, DataCeutics, Inc. A SIMPLE BUT POWERFUL PROC The Frequency procedure can be very useful for getting a general sense of the contents

More information

Choosing the Right Procedure

Choosing the Right Procedure 3 CHAPTER 1 Choosing the Right Procedure Functional Categories of Base SAS Procedures 3 Report Writing 3 Statistics 3 Utilities 4 Report-Writing Procedures 4 Statistical Procedures 5 Efficiency Issues

More information

Stored Processes or How to Make You Use SAS Without Even Knowing It!

Stored Processes or How to Make You Use SAS Without Even Knowing It! Paper 1419-2017 Stored Processes or How to Make You Use SAS Without Even Knowing It! Mahmoud Mamlouk, BMO Harris Bank; Edmund Lee, Bank of Montreal ABSTRACT Dealing with analysts and managers who do not

More information

CIS 45, The Introduction. What is a database? What is data? What is information?

CIS 45, The Introduction. What is a database? What is data? What is information? CIS 45, The Introduction I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won t last out the year. The editor

More information

Paper ###-YYYY. SAS Enterprise Guide: A Revolutionary Tool! Jennifer First, Systems Seminar Consultants, Madison, WI

Paper ###-YYYY. SAS Enterprise Guide: A Revolutionary Tool! Jennifer First, Systems Seminar Consultants, Madison, WI Paper ###-YYYY SAS Enterprise Guide: A Revolutionary Tool! Jennifer First, Systems Seminar Consultants, Madison, WI ABSTRACT Whether you are a novice or a pro with SAS, Enterprise Guide has something for

More information

Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA

Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA ABSTRACT Removing duplicate observations from a data set is not as easy as it might

More information

Sorting big datasets. Do we really need it? Daniil Shliakhov, Experis Clinical, Kharkiv, Ukraine

Sorting big datasets. Do we really need it? Daniil Shliakhov, Experis Clinical, Kharkiv, Ukraine PharmaSUG 2015 - Paper QT21 Sorting big datasets. Do we really need it? Daniil Shliakhov, Experis Clinical, Kharkiv, Ukraine ABSTRACT Very often working with big data causes difficulties for SAS programmers.

More information

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma ABSTRACT Today there is more pressure on programmers to deliver summary outputs faster without sacrificing quality. By using just a few programming

More information

Unlock SAS Code Automation with the Power of Macros

Unlock SAS Code Automation with the Power of Macros SESUG 2015 ABSTRACT Paper AD-87 Unlock SAS Code Automation with the Power of Macros William Gui Zupko II, Federal Law Enforcement Training Centers SAS code, like any computer programming code, seems to

More information

Exsys RuleBook Selector Tutorial. Copyright 2004 EXSYS Inc. All right reserved. Printed in the United States of America.

Exsys RuleBook Selector Tutorial. Copyright 2004 EXSYS Inc. All right reserved. Printed in the United States of America. Exsys RuleBook Selector Tutorial Copyright 2004 EXSYS Inc. All right reserved. Printed in the United States of America. This documentation, as well as the software described in it, is furnished under license

More information

Creating a Pivot Table

Creating a Pivot Table Contents Introduction... 1 Creating a Pivot Table... 1 A One-Dimensional Table... 2 A Two-Dimensional Table... 4 A Three-Dimensional Table... 5 Hiding and Showing Summary Values... 5 Adding New Data and

More information

Excel Pivot Tables. Step by Step Guide. CONQUER THE FEAR OF EXCEL

Excel Pivot Tables. Step by Step Guide.  CONQUER THE FEAR OF EXCEL Excel Pivot Tables CONQUER THE FEAR OF EXCEL www.learnexcelnow.com Excel Pivot Tables Table of Contents Intro Page 3 Set Up/Build a Pivot Table Page 5 Manipulate the Date Page 7 Report on the Data Page

More information

An Introduction to PROC REPORT

An Introduction to PROC REPORT Paper BB-276 An Introduction to PROC REPORT Kirk Paul Lafler, Software Intelligence Corporation, Spring Valley, California Abstract SAS users often need to create and deliver quality custom reports and

More information

Preserving your SAS Environment in a Non-Persistent World. A Detailed Guide to PROC PRESENV. Steven Gross, Wells Fargo, Irving, TX

Preserving your SAS Environment in a Non-Persistent World. A Detailed Guide to PROC PRESENV. Steven Gross, Wells Fargo, Irving, TX Preserving your SAS Environment in a Non-Persistent World A Detailed Guide to PROC PRESENV Steven Gross, Wells Fargo, Irving, TX ABSTRACT For Enterprise Guide users, one of the challenges often faced is

More information

APPENDIX 2 Customizing SAS/ASSIST Software

APPENDIX 2 Customizing SAS/ASSIST Software 241 APPENDIX 2 Customizing SAS/ASSIST Software Introduction 241 Setting User Profile Options 241 Creating an Alternate Menu Bar 243 Introduction This appendix describes how you can customize your SAS/ASSIST

More information

Using SAS 9.4M5 and the Varchar Data Type to Manage Text Strings Exceeding 32kb

Using SAS 9.4M5 and the Varchar Data Type to Manage Text Strings Exceeding 32kb ABSTRACT Paper 2690-2018 Using SAS 9.4M5 and the Varchar Data Type to Manage Text Strings Exceeding 32kb John Schmitz, Luminare Data LLC Database systems support text fields much longer than the 32kb limit

More information

CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD

CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD ABSTRACT SESUG 2016 - RV-201 CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD Those of us who have been using SAS for more than a few years often rely

More information

Microsoft Office Illustrated Introductory, Building and Using Queries

Microsoft Office Illustrated Introductory, Building and Using Queries Microsoft Office 2007- Illustrated Introductory, Building and Using Queries Creating a Query A query allows you to ask for only the information you want vs. navigating through all the fields and records

More information

The REPORT Procedure: A Primer for the Compute Block

The REPORT Procedure: A Primer for the Compute Block Paper TT15-SAS The REPORT Procedure: A Primer for the Compute Block Jane Eslinger, SAS Institute Inc. ABSTRACT It is well-known in the world of SAS programming that the REPORT procedure is one of the best

More information

Excel Macros, Links and Other Good Stuff

Excel Macros, Links and Other Good Stuff Excel Macros, Links and Other Good Stuff COPYRIGHT Copyright 2001 by EZ-REF Courseware, Laguna Beach, CA http://www.ezref.com/ All rights reserved. This publication, including the student manual, instructor's

More information

1. Managing Information in Table

1. Managing Information in Table 1. Managing Information in Table Spreadsheets are great for making lists (such as phone lists, client lists). The researchers discovered that not only was list management the number one spreadsheet activity,

More information

SAS BI Dashboard 3.1. User s Guide Second Edition

SAS BI Dashboard 3.1. User s Guide Second Edition SAS BI Dashboard 3.1 User s Guide Second Edition The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2007. SAS BI Dashboard 3.1: User s Guide, Second Edition. Cary, NC:

More information

An Easy Way to Split a SAS Data Set into Unique and Non-Unique Row Subsets Thomas E. Billings, MUFG Union Bank, N.A., San Francisco, California

An Easy Way to Split a SAS Data Set into Unique and Non-Unique Row Subsets Thomas E. Billings, MUFG Union Bank, N.A., San Francisco, California An Easy Way to Split a SAS Data Set into Unique and Non-Unique Row Subsets Thomas E. Billings, MUFG Union Bank, N.A., San Francisco, California This work by Thomas E. Billings is licensed (2017) under

More information

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development Information Technology MS Office Excel 2007 Users Guide EXCEL 2007 Using Excel for Data Query & Management IT Training & Development (818) 677-1700 Training@csun.edu TABLE OF CONTENTS Introduction... 1

More information

Setting the Percentage in PROC TABULATE

Setting the Percentage in PROC TABULATE SESUG Paper 193-2017 Setting the Percentage in PROC TABULATE David Franklin, QuintilesIMS, Cambridge, MA ABSTRACT PROC TABULATE is a very powerful procedure which can do statistics and frequency counts

More information

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc. PharmaSUG2011 - Paper DM03 Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc., TX ABSTRACT In the Clinical trials data analysis

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

Paper HOW-06. Tricia Aanderud, And Data Inc, Raleigh, NC

Paper HOW-06. Tricia Aanderud, And Data Inc, Raleigh, NC Paper HOW-06 Building Your First SAS Stored Process Tricia Aanderud, And Data Inc, Raleigh, NC ABSTRACT Learn how to convert a simple SAS macro into three different stored processes! Using examples from

More information

SAS ENTERPRISE GUIDE USER INTERFACE

SAS ENTERPRISE GUIDE USER INTERFACE Paper 294-2008 What s New in the 4.2 releases of SAS Enterprise Guide and the SAS Add-In for Microsoft Office I-kong Fu, Lina Clover, and Anand Chitale, SAS Institute Inc., Cary, NC ABSTRACT SAS Enterprise

More information

Reducing SAS Dataset Merges with Data Driven Formats

Reducing SAS Dataset Merges with Data Driven Formats Paper CT01 Reducing SAS Dataset Merges with Data Driven Formats Paul Grimsey, Roche Products Ltd, Welwyn Garden City, UK ABSTRACT Merging different data sources is necessary in the creation of analysis

More information

Format-o-matic: Using Formats To Merge Data From Multiple Sources

Format-o-matic: Using Formats To Merge Data From Multiple Sources SESUG Paper 134-2017 Format-o-matic: Using Formats To Merge Data From Multiple Sources Marcus Maher, Ipsos Public Affairs; Joe Matise, NORC at the University of Chicago ABSTRACT User-defined formats are

More information

How to Remove Duplicate Rows in Excel

How to Remove Duplicate Rows in Excel How to Remove Duplicate Rows in Excel http://www.howtogeek.com/198052/how-to-remove-duplicate-rows-in-excel/ When you are working with spreadsheets in Microsoft Excel and accidentally copy rows, or if

More information

Post-Processing.LST files to get what you want

Post-Processing.LST files to get what you want Paper CC04 Post-Processing.LST files to get what you want Edward Foster, Oxford Pharmaceutical Sciences, UK ABSTRACT SAS has a range of procedures you can use to create table and listing output. These

More information

A Macro that can Search and Replace String in your SAS Programs

A Macro that can Search and Replace String in your SAS Programs ABSTRACT MWSUG 2016 - Paper BB27 A Macro that can Search and Replace String in your SAS Programs Ting Sa, Cincinnati Children s Hospital Medical Center, Cincinnati, OH In this paper, a SAS macro is introduced

More information

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN Paper 045-29 A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN ABSTRACT: PROC MEANS analyzes datasets according to the variables listed in its Class

More information

Lab 19: Excel Formatting, Using Conditional Formatting and Sorting Records

Lab 19: Excel Formatting, Using Conditional Formatting and Sorting Records Lab 19: Excel Formatting, Using Conditional Formatting and Sorting Records () CONTENTS 1 Lab Topic... 2 1.1 In-Lab... 2 1.1.1 In-Lab Materials... 2 1.1.2 In-Lab Instructions... 2 1.2 Out-Lab... 9 1.2.1

More information

Chapter 6 Creating Reports. Chapter Table of Contents

Chapter 6 Creating Reports. Chapter Table of Contents Chapter 6 Creating Reports Chapter Table of Contents Introduction...115 Listing Data...115 ListDataOptions...116 List Data Titles...118 ListDataVariables...118 Example:CreateaListingReport...119 Creating

More information

SAS Application to Automate a Comprehensive Review of DEFINE and All of its Components

SAS Application to Automate a Comprehensive Review of DEFINE and All of its Components PharmaSUG 2017 - Paper AD19 SAS Application to Automate a Comprehensive Review of DEFINE and All of its Components Walter Hufford, Vincent Guo, and Mijun Hu, Novartis Pharmaceuticals Corporation ABSTRACT

More information

PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need

PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need ABSTRACT Paper PO 133 PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need Imelda C. Go, South Carolina Department of Education, Columbia,

More information

Introducing a Colorful Proc Tabulate Ben Cochran, The Bedford Group, Raleigh, NC

Introducing a Colorful Proc Tabulate Ben Cochran, The Bedford Group, Raleigh, NC Paper S1-09-2013 Introducing a Colorful Proc Tabulate Ben Cochran, The Bedford Group, Raleigh, NC ABSTRACT Several years ago, one of my clients was in the business of selling reports to hospitals. He used

More information

Can you decipher the code? If you can, maybe you can break it. Jay Iyengar, Data Systems Consultants LLC, Oak Brook, IL

Can you decipher the code? If you can, maybe you can break it. Jay Iyengar, Data Systems Consultants LLC, Oak Brook, IL Paper 11667-2016 Can you decipher the code? If you can, maybe you can break it. Jay Iyengar, Data Systems Consultants LLC, Oak Brook, IL ABSTRACT You would think that training as a code breaker, similar

More information

ISSUE #2 / FALL 2016

ISSUE #2 / FALL 2016 REVIT PURE PRESENTS PAMPHLETS ISSUE #2 / FALL 2016 SCHEDULES revitpure.com Copyright 2016 - BIM Pure productions WHAT IS THIS PAMPHLET? Revit Pure Pamphlets are published 4 times a year by email. Each

More information

PharmaSUG China. Systematically Reordering Axis Major Tick Values in SAS Graph Brian Shen, PPDI, ShangHai

PharmaSUG China. Systematically Reordering Axis Major Tick Values in SAS Graph Brian Shen, PPDI, ShangHai PharmaSUG China Systematically Reordering Axis Major Tick Values in SAS Graph Brian Shen, PPDI, ShangHai ABSTRACT Once generating SAS graphs, it is a headache to programmers to reorder the axis tick values

More information

Cleaning up your SAS log: Note Messages

Cleaning up your SAS log: Note Messages Paper 9541-2016 Cleaning up your SAS log: Note Messages ABSTRACT Jennifer Srivastava, Quintiles Transnational Corporation, Durham, NC As a SAS programmer, you probably spend some of your time reading and

More information

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS

More information

Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA

Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA ABSTRACT This paper describes for an intermediate SAS user the use of PROC REPORT to create

More information

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions Introduction to SAS Procedures SAS Basics III Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step Programming

More information

Excel Tables & PivotTables

Excel Tables & PivotTables Excel Tables & PivotTables A PivotTable is a tool that is used to summarize and reorganize data from an Excel spreadsheet. PivotTables are very useful where there is a lot of data that to analyze. PivotTables

More information

Filter and PivotTables in Excel

Filter and PivotTables in Excel Filter and PivotTables in Excel FILTERING With filters in Excel you can quickly collapse your spreadsheet to find records meeting specific criteria. A lot of reporters use filter to cut their data down

More information

Language Editor User Manual

Language Editor User Manual Language Editor User Manual June 2010 Contents Introduction... 3 Install the Language Editor... 4 Start using the Language Editor... 6 Editor screen... 8 Section 1: Translating Text... 9 Load Translations...

More information

PIVOT TABLES IN MICROSOFT EXCEL 2016

PIVOT TABLES IN MICROSOFT EXCEL 2016 PIVOT TABLES IN MICROSOFT EXCEL 2016 A pivot table is a powerful tool that allows you to take a long list of data and transform it into a more compact and readable table. In the process, the tool allows

More information

Graded Project. Microsoft Excel

Graded Project. Microsoft Excel Graded Project Microsoft Excel INTRODUCTION 1 PROJECT SCENARIO 1 CREATING THE WORKSHEET 2 GRAPHING YOUR RESULTS 4 INSPECTING YOUR COMPLETED FILE 6 PREPARING YOUR FILE FOR SUBMISSION 6 Contents iii Microsoft

More information

Ranking Between the Lines

Ranking Between the Lines Ranking Between the Lines A %MACRO for Interpolated Medians By Joe Lorenz SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in

More information

Using SAS Macros to Extract P-values from PROC FREQ

Using SAS Macros to Extract P-values from PROC FREQ SESUG 2016 ABSTRACT Paper CC-232 Using SAS Macros to Extract P-values from PROC FREQ Rachel Straney, University of Central Florida This paper shows how to leverage the SAS Macro Facility with PROC FREQ

More information

GiftGuide/GiftStory/GiftCalcs User Reference Manual

GiftGuide/GiftStory/GiftCalcs User Reference Manual GiftGuide/GiftStory/GiftCalcs User Reference Manual Copyright (c) 2011 PG Calc Incorporated All rights reserved. Unauthorized use or duplication is prohibited. revised 6/16/2011 Table of Contents Getting

More information

Business Insight Authoring

Business Insight Authoring Business Insight Authoring Getting Started Guide ImageNow Version: 6.7.x Written by: Product Documentation, R&D Date: August 2016 2014 Perceptive Software. All rights reserved CaptureNow, ImageNow, Interact,

More information

Exporting Variable Labels as Column Headers in Excel using SAS Chaitanya Chowdagam, MaxisIT Inc., Metuchen, NJ

Exporting Variable Labels as Column Headers in Excel using SAS Chaitanya Chowdagam, MaxisIT Inc., Metuchen, NJ Paper 74924-2011 Exporting Variable Labels as Column Headers in Excel using SAS Chaitanya Chowdagam, MaxisIT Inc., Metuchen, NJ ABSTRACT Excel output is the desired format for most of the ad-hoc reports

More information

Christopher Toppe, Ph.D. Computer Sciences Corporation

Christopher Toppe, Ph.D. Computer Sciences Corporation An Introduction to PROC TABULATE: A Hands-On Workshop Christopher Toppe, Ph.D. Computer Sciences Corporation Abstract The Tabulate procedure is, along with PROC REPORT, one of the most powerful and difficult

More information

SAS Visual Analytics Environment Stood Up? Check! Data Automatically Loaded and Refreshed? Not Quite

SAS Visual Analytics Environment Stood Up? Check! Data Automatically Loaded and Refreshed? Not Quite Paper SAS1952-2015 SAS Visual Analytics Environment Stood Up? Check! Data Automatically Loaded and Refreshed? Not Quite Jason Shoffner, SAS Institute Inc., Cary, NC ABSTRACT Once you have a SAS Visual

More information

Applications Development. Paper 38-28

Applications Development. Paper 38-28 Paper 38-28 The California Template or How to keep from reinventing the wheel using SAS/IntrNet, JavaScript and process reengineering Blake R. Sanders, U.S. Census Bureau, Washington, DC ABSTRACT Creating

More information

Writing Programs in SAS Data I/O in SAS

Writing Programs in SAS Data I/O in SAS Writing Programs in SAS Data I/O in SAS Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Writing SAS Programs Your SAS programs can be written in any text editor, though you will often want

More information

A Generalized Macro-Based Data Reporting System to Produce Both HTML and Text Files

A Generalized Macro-Based Data Reporting System to Produce Both HTML and Text Files A Generalized Macro-Based Data Reporting System to Produce Both HTML and Text Files Jeff F. Sun, Blue Cross Blue Shield of North Carolina, Durham, North Carolina Abstract This paper will address the inter-connection

More information

The Dataset Diet How to transform short and fat into long and thin

The Dataset Diet How to transform short and fat into long and thin Paper TU06 The Dataset Diet How to transform short and fat into long and thin Kathryn Wright, Oxford Pharmaceutical Sciences, UK ABSTRACT What do you do when you are given a dataset with one observation

More information

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently. 255 APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software Introduction 255 Generating a QMF Export Procedure 255 Exporting Queries from QMF 257 Importing QMF Queries into Query and Reporting 257 Alternate

More information

Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA Paper 160-26 Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA ABSTRACT Visualizing and presenting data effectively

More information