You are on page 1of 708

Creating Business

Intelligence for Your


Organization: Fast Track

Course Notes

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Creating Business Intelligence for Your Organization: Fast Track Course Notes was developed by Eric
Rossland. Additional contributions were made by Richard Bell, Marty Flis, Anita Hillhouse, Linda Jolley,
Kari Richardson, Christine Vitron, and James Waite. Editing and production support was provided by the
Curriculum Development and Support Department.
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.

Creating Business Intelligence for Your Organization: Fast Track Course Notes

Copyright 2011 SAS Institute Inc. Cary, NC, USA. All rights reserved. Printed in the United States of
America. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in
any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written
permission of the publisher, SAS Institute Inc.

Book code E2028, course code SBAFT43, prepared date 24Oct2011. SBAFT43_001

ISBN 978-1-61290-061-2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
For Your Information iii

Table of Contents

Course Description ...................................................................................................................... ix

Prerequisites ................................................................................................................................. x

Chapter 1 Introduction .......................................................................................... 1-1

1.1 Exploring the Platform for SAS Business Analytics ....................................................... 1-3

1.2 Introducing the SAS Education Job Roles ..................................................................... 1-12


Exercises.................................................................................................................. 1-17

1.3 Introducing the Course Environment and Scenario ....................................................... 1-19

1.4 Solutions ........................................................................................................................ 1-23


Solutions to Exercises ............................................................................................. 1-23
Solutions to Student Activities (Polls/Quizzes) ....................................................... 1-25

Chapter 2 Overview of the Business User Reporting Applications .................. 2-1

2.1 Defining the Business User Role and Reporting Applications ........................................ 2-3

2.2 Exploring the SAS Add-In for Microsoft Office ............................................................. 2-6
Demonstration: Using the SAS Add-In for Microsoft Office ................................. 2-22

2.3 Exploring SAS Web Report Studio ................................................................................ 2-41


Demonstration: Using SAS Web Report Studio...................................................... 2-54

2.4 Exploring the SAS Information Delivery Portal ............................................................ 2-63


Demonstration: Using the SAS Information Delivery Portal.................................. 2-69

2.5 Defining the BI Content Developer Role and Applications ........................................... 2-76

2.6 Solutions to Student Activities (Polls/Quizzes) ............................................................. 2-90

Chapter 3 Overview of Data Management ........................................................... 3-1

3.1 Understanding SAS Data Integration Capabilities........................................................... 3-3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
iv For Your Information

3.2 Creating Data Sources for Reporting and Analysis ......................................................... 3-8
Demonstration: Creating a New SAS Data Integration Studio Job......................... 3-12

3.3 Creating Data Sources Using SAS Enterprise Guide..................................................... 3-23


Demonstration: Creating Data Sources with a SAS Enterprise Guide Job ............. 3-30

3.4 Building an OLAP Cube ................................................................................................ 3-35


Demonstration: Building an OLAP Cube .............................................................. 3-46

3.5 Solutions to Student Activities (Polls/Quizzes) ............................................................. 3-54

Chapter 4 Creating Information Maps .................................................................. 4-1

4.1 Understanding SAS Information Maps ............................................................................ 4-3

4.2 Using Different Data Sources ........................................................................................ 4-12


Demonstration: Creating a New Information Map ................................................. 4-25
Exercises.................................................................................................................. 4-32

4.3 Exploiting Dynamic Subsetting of Data ........................................................................ 4-34


Demonstration: Creating Simple Filters.................................................................. 4-42
Demonstration: Creating Compound Filters ........................................................... 4-49
Exercises.................................................................................................................. 4-52
Demonstration: Creating Prompted Filters ............................................................. 4-57
Exercises.................................................................................................................. 4-63

4.4 Creating Prefilters to Subset the Information Map Data ................................................ 4-65
Demonstration: Using Prefilters .............................................................................. 4-75

4.5 Building an Information Map from a SAS OLAP Cube ................................................ 4-84
Demonstration: Creating an Information Map Using an OLAP Cube .................... 4-88

4.6 Solutions ........................................................................................................................ 4-92


Solutions to Exercises ............................................................................................. 4-92
Solutions to Student Activities (Polls/Quizzes) ..................................................... 4-104

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
For Your Information v

Chapter 5 Creating Stored Processes.................................................................. 5-1

5.1 Understanding SAS Stored Process Concepts ................................................................. 5-3


Demonstration: Running a Stored Process in SAS Enterprise Guide ..................... 5-15
Exercises.................................................................................................................. 5-18

5.2 Creating a Stored Process from a SAS Enterprise Guide Project .................................. 5-19
Demonstration: Creating New Stored Processes Using SAS Enterprise Guide ...... 5-35
Exercises.................................................................................................................. 5-46

5.3 Creating a Stored Process from a SAS Program ............................................................ 5-47


Demonstration: Creating a Stored Process from Existing SAS Program Code ...... 5-51
Exercises.................................................................................................................. 5-55

5.4 Creating Stored Process Parameters............................................................................... 5-56


Demonstration: Creating a Stored Process with a Prompt to Filter Data ................ 5-71
Exercises.................................................................................................................. 5-83

5.5 Creating Advanced Prompts .......................................................................................... 5-84


Demonstration: Creating a Stored Process with Cascading Prompts ...................... 5-87
Demonstration: Creating a Stored Process with a Selection Group ........................ 5-97

5.6 Solutions ...................................................................................................................... 5-106


Solutions to Exercises ........................................................................................... 5-106
Solutions to Student Activities (Polls/Quizzes) ..................................................... 5-119

Chapter 6 Creating Dashboards ........................................................................... 6-1

6.1 SAS BI Dashboard Terminology and Interfaces .............................................................. 6-3

6.2 Designing SAS BI Dashboard Components .................................................................. 6-17

6.3 Creating Indicator Data .................................................................................................. 6-24


Demonstration: Using an Information Map Data Source........................................ 6-35
Exercises.................................................................................................................. 6-42
Demonstration: Using an SQL Query Data Source................................................. 6-51

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
vi For Your Information

6.4 Creating Ranges ............................................................................................................. 6-55


Demonstration: Creating Ranges ............................................................................ 6-59
Exercises.................................................................................................................. 6-62

6.5 Creating Indicators ......................................................................................................... 6-63


Demonstration: Creating Indicators ........................................................................ 6-85
Exercises.................................................................................................................. 6-98

6.6 Creating Dashboards and Defining Interactions .......................................................... 6-101


Demonstration: Creating a New Dashboard.......................................................... 6-111
Demonstration: Adding a Menu System to a Dashboard ...................................... 6-118
Demonstration: Adding Dashboard Interactions ................................................... 6-126
Exercises................................................................................................................ 6-128

6.7 Solutions ...................................................................................................................... 6-129


Solutions to Exercises ........................................................................................... 6-129
Solutions to Student Activities (Polls/Quizzes) ..................................................... 6-141

Chapter 7 Building a Business User Reporting Application .............................. 7-1

7.1 Building a Business User Reporting Application ............................................................ 7-3


Exercises.................................................................................................................... 7-8

7.2 Solutions to Exercises .................................................................................................... 7-34

Chapter 8 Overview of SAS Visual BI ................................................................. 8-1

8.1 Introduction to SAS Visual BI ......................................................................................... 8-3

8.2 Exploring the SAS Integration with JMP ........................................................................ 8-8


Demonstration: Using SAS Visual BI ..................................................................... 8-16

8.3 Solutions to Student Activities (Polls/Quizzes) ............................................................. 8-31

Chapter 9 Examining the Environment Metadata................................................ 9-1

9.1 Reviewing the Platform for SAS Business Analytics ...................................................... 9-3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
For Your Information vii

9.2 Reviewing the Couse Environment and Metadata ......................................................... 9-10


Demonstration: Review the Metadata Defined on the Classroom Image ............... 9-14

Chapter 10 Learning More ..................................................................................... 10-1

10.1 SAS Resources ............................................................................................................... 10-3

10.2 Beyond This Course ....................................................................................................... 10-6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
viii For Your Information

Course Description
This intensive training course provides accelerated learning for those students who will build reports,
analyses, and dashboards for consumption by business users and other information consumers in their
organization. This course is for individuals who are comfortable with learning large amounts of
information in a short period of time. The Creating Business Intelligence for Your Organization 1:
Essentials and Creating Business Intelligence for Your Organization 2: Additional Topics courses are
available to provide the same type of information in a much more detailed approach over a longer period
of time.

To learn more

For information about other courses in the curriculum, contact the SAS
Education Division at 1-800-333-7660, or send e-mail to training@sas.com.
You can also find this information on the Web at support.sas.com/training/
as well as in the Training Course Catalog.

For a list of other SAS books that relate to the topics covered in this
Course Notes, USA customers can contact our SAS Publishing Department
at 1-800-727-3228 or send e-mail to sasbook@sas.com. Customers outside
the USA, please contact your local SAS office.
Also, see the Publications Catalog on the Web at support.sas.com/pubs for
a complete list of books and a convenient order form.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
For Your Information ix

Prerequisites
No SAS experience or programming experience is required, although you should have some computer
experience. Specifically, you should
be able to log on and off a computer and use a keyboard or mouse
have some experience using Microsoft Word and Microsoft Excel (specifically, you should be able to
open and save documents, use the menus and toolbars to accomplish tasks, and navigate Word
documents and Excel spreadsheets)
know how to use a Web browser to access information.
Experience with SAS programming and/or SAS Enterprise Guide is helpful but not required. You can
gain SAS programming experience by attending the SAS Programming 1: Essentials course. You can gain
SAS Enterprise Guide experience by attending the SAS Enterprise Guide 1: Querying and Reporting
course.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
x For Your Information

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 1 Introduction

1.1 Exploring the Platform for SAS Business Analytics ................................................... 1-3

1.2 Introducing the SAS Education Job Roles ................................................................ 1-12


Exercises .............................................................................................................................. 1-17

1.3 Introducing the Course Environment and Scenario.................................................. 1-19

1.4 Solutions ....................................................................................................................... 1-23


Solutions to Exercises .......................................................................................................... 1-23

Solutions to Student Activities (Polls/Quizzes) ..................................................................... 1-25

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-2 Chapter 1 Introduction

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.1 Exploring the Platform for SAS Business Analytics 1-3

1.1 Exploring the Platform for SAS Business Analytics

Objectives
Compare the two types of SAS installations.
Define the architecture of the platform for
SAS Business Analytics.
List the SAS platform applications used
for data management, reporting, and analytics.
Describe the SAS Folders tree.

Two Flavors of SAS


With SAS9, there are two different types of SAS
installations:
SAS Foundation

platform for SAS Business Analytics

SAS Foundation Platform for SAS Business Analytics

SAS Foundation is the traditional SAS installation, which enables you to write SAS programs or use a
point-and-click application such as SAS Enterprise Guide to assist with creating programs.
The platform for SAS Business Analytics is enterprise software that uses multiple machines throughout the
organization. This SAS platform consists of applications that help you accomplish the various tasks for
accessing and creating information, as well as performing analysis and reporting.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-4 Chapter 1 Introduction

SAS Foundation: SAS Windowing Environment


The SAS windowing environment can be used to develop
and run SAS programs.

1.01 Poll
Do you use the SAS windowing environment?
Yes
No

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.1 Exploring the Platform for SAS Business Analytics 1-5

SAS Foundation: SAS Enterprise Guide


SAS programs can also be developed using the
point-and-click interface in SAS Enterprise Guide.

1.02 Poll
Do you use SAS Enterprise Guide?
Yes
No

10

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-6 Chapter 1 Introduction

What Is the Platform for


SAS Business Analytics?
The platform for SAS
Business Analytics is
enterprise software with
components that exist
on multiple machines
throughout the
organization.

11

The platform for SAS Business Analytics is also known as the SAS Enterprise Intelligence
Platform and the SAS Intelligence Platform.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.1 Exploring the Platform for SAS Business Analytics 1-7

SAS Platform Architecture


The platform for
SAS Business
Analytics consists
of a multiple-tier
environment that
is typically
represented
by the following:
client tier

middle tier

server tier

data tier

12

The client tier consists of different applications that are typically installed on each users machine.
The middle tier is where the Web applications reside and execute.
The server tier consists of one or more machines where the SAS servers are installed and accessed by the
SAS platform applications.
The data tier contains the enterprise data sources.
The metadata server and metadata repositories are used to manage information about the entire
environment, including server definitions; data definitions; users and groups; security settings; and
business intelligence content.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-8 Chapter 1 Introduction

SAS Folder Structure


SAS platform applications create various items that are
stored in metadata using the SAS Folders structure.

Channels Cubes

Dashboards Folders

Information maps Jobs

Libraries OLAP schema

Prompts Reports

Stored processes Tables

13
1
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.1 Exploring the Platform for SAS Business Analytics 1-9

SAS Folders Tree


The folders are arranged in a structure that
separates system
information from business
information
provides personal folders
for individual users
provides an area for
shared data.

14
1
4

SAS Folders Is the top level (root) folder in the tree.

My Folder Is similar to the My Documents folder in Windows; it provides a standard


location for storing user content.

BILineage Is the custom repository that contains scan results from the BILineage plug-in.

Products Contains objects that are installed with a SAS application, such as sample
libraries, tables, and stored processes.

Shared Data Provides a place to store content that is shared among multiple users.

System Contains SAS system objects such as object type definitions. Depending on the
application that you are using and the authorization settings, this folder and its
subfolders might not be visible.

Users Contains user home folders. A user's My Folder folder is a subfolder of the
user's home folder. Depending on the application that you are using, this folder
and its subfolders might not be visible.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-10 Chapter 1 Introduction

Metadata Users and Groups


In order to control access to SAS platform content, SAS
must know who is making each request and what type
of functionality has been requested.

Users A user is an individual person or service


identity.
Groups A group is a set of users. Groups provide an
easy method to specify permissions for similar
users.

15
1
5

Metadata Roles
Roles determine which user interface elements a user
sees when interacting with an application. The various
features in applications that provide role-based
management are called capabilities.

Applications that support roles


include the following:
SAS Add-In for Microsoft Office

SAS Enterprise Guide

SAS Web Report Studio

SAS Management Console

16
1
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.1 Exploring the Platform for SAS Business Analytics 1-11

SAS Platform Applications


The SAS platform applications provide intuitive point-and-
click interfaces to surface the power of business analytics
without requiring technical expertise.

SAS Platform Applications

Data Management Analytics Reporting

SAS Data Integration Studio SAS Enterprise Guide SAS Information Delivery Portal

DataFlux dfPower Studio SAS Enterprise Miner SAS BI Dashboard

SAS OLAP Cube Studio SAS Visual BI (JMP) SAS Web Report Studio

SAS Information Map Studio SAS Forecast Studio SAS Add-In for Microsoft Office

17

The SAS platform applications were created to organize the functions of various job roles into the
different applications. Instead of having one large client application that does everything for all people
across the organization, there are several applications to accomplish these tasks.
Some of these applications are installed on each users machine; others are accessed using a Web browser.

The applications listed above are not all of the applications available with the SAS platform.

1.03 Multiple Answer Poll


Which of the following tiers of the SAS platform contain
SAS applications for data management, analytics, and
reporting?
a. Client tier
b. Data tier
c. Middle tier
d. Server tier

19

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-12 Chapter 1 Introduction

1.2 Introducing the SAS Education Job Roles

Objectives
List the job roles used by SAS Education for grouping
training on the SAS platform.
Describe the different types of SAS platform
applications.
Explain the SAS Prompting Framework.
Describe the two parts of prompting.

23

SAS Platform Job Roles


SAS Education created the following job roles
to organize training by similar functionality based
on common job tasks:
BI applications developer

BI content developer

Business user

Data integration developer


Data quality steward

Platform administrator

Project manager

24
2
4

These job roles differ from the SAS metadata roles.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.2 Introducing the SAS Education Job Roles 1-13

BI Applications Developer
BI applications developers build, implement,
and customize applications.
The software and applications primarily used by
BI applications developers include the following:
SAS AppDev Studio

SAS/AF

SAS/IntrNet

25
2
5

BI Content Developer
BI content developers understand not only their
organizations data, but also the applications
required to create reports and analyses suitable
for business users and other information
consumers.
The software and applications primarily used by
BI content developers include the following:
SAS BI Dashboard

SAS Enterprise Guide

SAS Information Map Studio

SAS OLAP Cube Studio

SAS Stored Processes

SAS Visual BI

26
2
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-14 Chapter 1 Introduction

Business User
Business users include middle managers and
other information consumers who access
existing information and create ad hoc reports
and analyses using point-and-click applications.
The software and applications primarily used by business
users include the following:
SAS Add-In for Microsoft Office

SAS Information Delivery Portal

SAS Web Report Studio

27
2
7

Data Integration Developer


Data integration developers collect, cleanse,
and store the data required for reporting and
analysis.
The software and applications primarily used by
data integration architects include the following:
SAS Data Integration Studio

SAS Data Quality Solution

SAS Scalable Performance Data Server

28
2
8

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.2 Introducing the SAS Education Job Roles 1-15

Data Quality Steward


Data quality stewards profile data for
inconsistencies, apply various data-cleansing
techniques, and monitor data to ensure that
it is usable for reporting and analysis.
The software and applications primarily used by
data quality stewards include the following:
DataFlux dfPower Studio

DataFlux Integration Server

DataFlux dfPower Customize

29
2
9

Platform Administrator
Platform administrators are responsible for
installing, configuring, and maintaining the
platform for SAS Business Analytics.
The software and applications primarily used
by platform administrators include the following:
platform for SAS Business Analytics

SAS Management Console

30
3
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-16 Chapter 1 Introduction

Project Manager
Project managers are responsible for
establishing a set of best practices to
ensure the integrity and quality of projects.

31
3
1

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.2 Introducing the SAS Education Job Roles 1-17

Exercises

1. Locating the SAS Platform Applications


a. Log on to your classroom machine with the user name and password provided by your instructor.
b. Look in the default location (Start All Programs SAS) for the SAS platform applications
on your local machine.
c. Which of the following applications are available from the default location?
___ SAS Add-In for Microsoft Office
___ SAS BI Dashboard
___ SAS Data Integration Studio
___ SAS Enterprise Guide
___ SAS Information Delivery Portal
___ SAS Information Map Studio
___ SAS Management Console
___ SAS OLAP Cube Studio
___ SAS Stored Process Web Application
___ SAS Web Report Studio

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-18 Chapter 1 Introduction

2. Locating the SAS Platform Applications Available from a Web Browser


a. Open Internet Explorer (Start All Programs Internet Explorer).

Do not use the 64-bit version of Internet Explorer on the classroom machines.

b. View the links stored as favorites in Internet Explorer.


c. Which of the following applications are bookmarked in Favorites?
___ SAS Add-In for Microsoft Office
___ SAS BI Dashboard
___ SAS Data Integration Studio
___ SAS Enterprise Guide
___ SAS Information Delivery Portal
___ SAS Information Map Studio
___ SAS Management Console
___ SAS OLAP Cube Studio
___ SAS Stored Process Web Application
___ SAS Web Report Studio

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.3 Introducing the Course Environment and Scenario 1-19

1.3 Introducing the Course Environment and Scenario

Objectives
Describe the classroom environment.
Describe the course scenario.

38

Classroom Environment
During this course, you use a classroom machine where
the SAS platform has been installed and configured in a
single-machine environment.
The single-machine environment provides an easy way
for each student to learn how to interact with the SAS
platform without impacting other students.
The classroom environment includes the following
predefined elements in the SAS metadata:
Users for the various job roles

Groups

Metadata folders with data and report objects

A basic security model

39

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-20 Chapter 1 Introduction

Course Data
The data used in the course is from a fictitious
global sports and outdoors retailer named Orion Star
Sports & Outdoors.

Orion Star has traditional stores, an online store,


and a large catalog business.
The corporate headquarters is located in the
United States with offices and stores in many
countries throughout the world.

40

Course Data
The Orion Star data used in the course consists
of the following:
Data ranging from 2003 through 2007

Employee information for the employees located


in many countries as well as in the United States
headquarters
Approximately 5,500 different sports and outdoor
products
Approximately 90,000 customers worldwide
Approximately 750,000 orders

64 suppliers

41

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.3 Introducing the Course Environment and Scenario 1-21

Orion Star Metadata Users and Groups


On the classroom image, metadata identities have
been created for all of the SAS users at Orion Star.
Each Orion Star user is also part of one or more
metadata groups.

Users

Groups
Ellen

Henri

Sales

Marketing

42
4
2

Orion Star Metadata Roles


Metadata roles have been defined to control which Orion
Star users have access to the various SAS application
features.
Example: Eric can access all of the features in
SAS Web Report Studio.
Henri has limited access to SAS Web Report
Studio and can view only existing reports.

43
4
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-22 Chapter 1 Introduction

Discussion

What are the benefits of providing different types


of access, such as report creation and report
viewing, to different users in an organization?

44

Orion Star Metadata Folders


SAS metadata folders have been
defined for the Marketing and Sales
Departments at Orion Star.
Each department folder contains
subfolders for data, reports, and
other content.
A security model has been defined
to control access to the SAS Folders
location and the SAS objects that it
contains.

45
4
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.4 Solutions 1-23

1.4 Solutions

Solutions to Exercises
1. Locating the SAS Platform Applications
a. Log on to your classroom machine with the user name and password provided by your instructor.
b. Look in the default location (Start All Programs SAS) for the SAS platform applications
on your local machine.
c. Which of the following applications are available from the default location?
___ SAS Add-In for Microsoft Office
___ SAS BI Dashboard
X SAS Data Integration Studio
X SAS Enterprise Guide
___ SAS Information Delivery Portal
X SAS Information Map Studio
X SAS Management Console
X SAS OLAP Cube Studio
___ SAS Stored Process Web Application
___ SAS Web Report Studio

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-24 Chapter 1 Introduction

2. Locating the SAS Platform Applications Available from a Web Browser


a. Open Internet Explorer (Start All Programs Internet Explorer).
b. View the links stored as favorites in Internet Explorer.
c. Which of the following applications are bookmarked in Favorites?
___ SAS Add-In for Microsoft Office
X SAS BI Dashboard
___ SAS Data Integration Studio
___ SAS Enterprise Guide
X SAS Information Delivery Portal
___ SAS Information Map Studio
___ SAS Management Console
___ SAS OLAP Cube Studio
X SAS Stored Process Web Application
X SAS Web Report Studio

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1.4 Solutions 1-25

Solutions to Student Activities (Polls/Quizzes)

1.03 Multiple Answer Poll Correct Answers


Which of the following tiers of the SAS platform contain
SAS applications for data management, analytics, and
reporting?
a. Client tier
b. Data tier
c. Middle tier
d. Server tier

20

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1-26 Chapter 1 Introduction

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 2 Overview of the Business
User Reporting Applications

2.1 Defining the Business User Role and Reporting Applications .................................. 2-3

2.2 Exploring the SAS Add-In for Microsoft Office ............................................................ 2-6
Demonstration: Using the SAS Add-In for Microsoft Office ................................................. 2-22

2.3 Exploring SAS Web Report Studio ............................................................................. 2-41


Demonstration: Using SAS Web Report Studio ................................................................... 2-54

2.4 Exploring the SAS Information Delivery Portal ......................................................... 2-63


Demonstration: Using the SAS Information Delivery Portal................................................. 2-69

2.5 Defining the BI Content Developer Role and Applications ....................................... 2-76

2.6 Solutions to Student Activities (Polls/Quizzes) ......................................................... 2-90

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-2 Chapter 2 Overview of the Business User Reporting Applications

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.1 Defining the Business User Role and Reporting Applications 2-3

2.1 Defining the Business User Role and Reporting


Applications

Objectives
Describe the benefits of SAS Business Intelligence
and SAS Reporting.
List the SAS platform applications for business
intelligence and reporting.

Business User (Review)


Business users include middle managers and
other information consumers who access
existing information and create ad hoc reports
and analyses using point-and-click applications.
The software and applications primarily used
by business users include the following:
SAS Add-In for Microsoft Office

SAS Information Delivery Portal

SAS Web Report Studio

4
4

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-4 Chapter 2 Overview of the Business User Reporting Applications

SAS Reporting Applications (Review)


There are several SAS platform applications that enable
you to perform business intelligence reporting tasks.

SAS Platform Applications

Data Management Analytics Reporting

SAS Data Integration Studio SAS Enterprise Guide SAS Information Delivery Portal

DataFlux dfPower Studio SAS Enterprise Miner SAS BI Dashboard

SAS OLAP Cube Studio SAS Visual BI (JMP) SAS Web Report Studio

SAS Information Map Studio SAS Forecast Studio SAS Add-In for Microsoft Office

SAS Add-In for Microsoft Office


The SAS Add-In for Microsoft Office provides access to
SAS functionality within several Office products.
The SAS add-in enables you to view and interact with
SAS Information Maps, SAS OLAP cubes, SAS Stored
Processes, SAS reports, and SAS tables.
You can also use SAS
tasks and wizards to SAS Add-In

analyze data sources for Microsoft


Office

and create reports.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.1 Defining the Business User Role and Reporting Applications 2-5

SAS Web Report Studio


SAS Web Report Studio is an easy-to-use query and
reporting application, designed for business users who
want to view, create, and share reports on the Web.
SAS Web Report Studio provides a point-and-click
interface for building reports from SAS Information Maps,
SAS OLAP cubes, and SAS tables.
SAS Stored Process output
can also be viewed and SAS Web
included in reports. Report Studio

SAS Information Delivery Portal


The SAS Information Delivery Portal provides business
users with a customizable interface to easily access data
and other SAS content using a Web browser.
The portal provides direct access to SAS BI Dashboards,
SAS Information Maps, SAS Stored Processes, and
SAS reports.
Other types of content
are also available. SAS Information
Delivery Portal

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-6 Chapter 2 Overview of the Business User Reporting Applications

2.2 Exploring the SAS Add-In for Microsoft Office

Objectives
Identify the SAS Add-In for Microsoft Office tab
on the Microsoft Office ribbon.
Explore the SAS Add-In for Microsoft Office options.
Describe the purpose of connection profiles.

11

SAS Add-In for Microsoft Office


The SAS Add-In for Microsoft Office is designed to extend
the functionality of Microsoft Office applications.

SAS Reporting
MEASURE MONITOR ANALYZE ACT

12

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-7

SAS Add-In for Microsoft Office


You can use tasks and wizards with both local and server-
defined data sources to produce results and distribute
them using Microsoft Excel, Microsoft Word, and
Microsoft PowerPoint.

13

2.01 Multiple Answer Poll


Which of the following Microsoft Office applications
do you use?
a. Microsoft Excel
b. Microsoft PowerPoint
c. Microsoft Word
d. Microsoft Outlook

15

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-8 Chapter 2 Overview of the Business User Reporting Applications

2.02 Multiple Choice Poll


Which version of Microsoft Office do you use most often?
a. Microsoft Office 2000
b. Microsoft Office 2003
c. Microsoft Office 2007
d. Microsoft Office 2010
e. Other
f. I do not know which version I use.

16

Using the SAS Add-In for Microsoft Office


The SAS add-in enables you to access the power
of SAS using the look and feel that is native to your
version of Microsoft Office.
When you use Office 2007 or Office 2010, the SAS add-in
functionality appears as a tab on the ribbon. Earlier
releases of Office provide the SAS add-in functionality
using the SAS menu on the menu bar.

17

The SAS add-in requires Microsoft Office 2000 or newer. The SAS Add-In for Microsoft Office
integration with Microsoft Outlook is supported for Microsoft Outlook 2007 and higher and
requires SAS 9.2 or later versions of SAS.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-9

Below are the SAS Add-In for Microsoft Office menu bars and toolbars from Office 2003.
Excel:

PowerPoint/Word:

Excel: PowerPoint/Word:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-10 Chapter 2 Overview of the Business User Reporting Applications

Context-Sensitive Ribbon
Additional groups become available depending on the
type of SAS content that you select.

18

With Microsoft Excel, Microsoft Word, and Microsoft PowerPoint, the Insert, Selection, and
Tools groups should always be available. Additional groups and options become available as
you select SAS content or work with data sources in Microsoft Excel.

Using the SAS Tab on the Office 2010 Ribbon


The SAS tab on the Office 2010 ribbon is divided into
groups. When you use the SAS add-in through Excel, the
Insert group includes additional functionality. The SAS tab
for Outlook only contains two groups.

19

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-11

2.03 Multiple Choice Poll


Have you ever worked with the SAS Add-In for Microsoft
Office?
a. No, this course is the first time.
b. Yes, I have explored it a little.
c. Yes, I use it all the time.

21

What Are Connection Profiles?


A connection profile is a file stored on the local machine.
The profile contains the information that is necessary to
connect the SAS application to your metadata server.

Connection
SAS Add-In for Profile SAS Metadata
Microsoft Office Server

If you use the SAS add-in without a profile, you can


access only a SAS server installed on your local machine.
You cannot use metadata libraries or share SAS
resources with other SAS applications.

22

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-12 Chapter 2 Overview of the Business User Reporting Applications

Connections Window
The Connections window is how you manage your
connection profile. To access the Connections window
in the SAS add-in, select Tools Connections
from the SAS tab on the Office ribbon.

23

Profiles for Windows applications are stored in files named ConfigurationV42.xml or


ConfigurationV43.xml on the machine where the Windows application is installed. The file is stored
in the users home directory in the following path:
Windows XP: Application Data SAS MetadataServerProfiles
Windows 7: AppData Roaming SAS MetadataServerProfiles

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-13

Connections Window: Profiles


The Profiles section in the Connections window enables
you to work with connection profiles. You can add, modify,
delete, or activate connection profiles.

Each profile contains a name, description, metadata


server name, and port, as well as user credentials.
24

The Servers section in the Connections window enables you to select the default metadata server to be
accessed by the active profile. You need to connect to a metadata server to access SAS data sources and
run SAS tasks.
The Updates section in the Connections window enables you to specify that you want to automatically
update the configuration for your connection. Automatic updating is available when a configuration
update file is stored in a network location.

SAS Add-In Role-Based Capabilities


Roles determine which user interface elements, known
as capabilities, a user sees when interacting with an
application.
The SAS Add-In for Microsoft Office is one of several SAS
platform applications that provide role-based capabilities.
This means that each user who accesses the SAS add-in
might have different interface elements available to him or
her. What you have access to in the classroom might also
be different from what you have access to at your site.

25

Role-based capabilities are typically maintained by the SAS platform administrator.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-14 Chapter 2 Overview of the Business User Reporting Applications

SAS Add-In Options


With the SAS add-in options, you can do the following:
Modify the settings for handling SAS data

Specify the default display location for results

Specify the default output format for results

Choose settings for how SAS tasks are surfaced

Modify settings for handling SAS stored processes

Specify your e-mail address to receive scheduled


results

26

Accessing Data
Using the SAS add-in, you can access many types
of data sources. These data sources can be used
to generate ad hoc reports or analyses, the results
of which can be embedded in your documents,
spreadsheets, or slide shows.
In general, you can use the SAS add-in to access
and view the following types of information:
SAS relational data sources

SAS multidimensional data sources

Excel data sources

SAS Information Maps

27
2
7

The SAS add-in can access only SAS Information Maps that use relational tables as the data
source. Information maps that use a SAS OLAP cube as the data source are not available in the
SAS add-in.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-15

Opening and Interacting with Data


Data sources defined in SAS metadata can be opened
directly into an Excel worksheet or PivotTable by
selecting SAS Data in the Insert group.
Worksheet

PivotTable

28
2
8

You cannot open a data source in Microsoft Word, Microsoft PowerPoint, or Microsoft Outlook.

Opening and Interacting with Data


When selecting a data source to bring into an Excel
worksheet or PivotTable, you have several options for
choosing which information to load and where to load it.

2
9
29 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-16 Chapter 2 Overview of the Business User Reporting Applications

Opening and Interacting with Data


In the Modify Data Source window, you can select the
variables to include, create a simple or advanced filter,
and sort your data.

30
3
0

Opening and Interacting with Data


In addition to tables, there are two other SAS data
sources that can be used to load data into Excel.
SAS Information Maps can be opened into
an Excel worksheet.
Multidimensional data sources such as SAS OLAP
cubes can be opened into an Excel PivotTable or the
OLAP Viewer.

31
3
1

Information maps created on OLAP cubes with SAS Information Map Studio are not supported in
the SAS add-in.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-17

What Is a SAS Information Map?


SAS Information Maps are metadata definitions of
enterprise data that provides a basis for querying and
reporting.

SAS SAS SAS


SAS Information
Map Studio
DBMS DBMS

Data Warehouse

32

What Is OLAP?
Online Analytical Processing, or OLAP, is an approach
to quickly answer analytical queries against
multidimensional data.
OLAP performs multidimensional analysis of business
data and provides the capability for complex calculations,
trend analysis, and sophisticated data modeling.
OLAP is part of the broader category of business
intelligence, which also encompasses relational reporting
and data mining.

33
3
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-18 Chapter 2 Overview of the Business User Reporting Applications

2.04 Multiple Choice Poll


Which of the following data sources can be accessed
with the SAS Add-In for Microsoft Office?
a. SAS relational data sources
b. Excel data sources
c. SAS Information Maps
d. OLAP cubes
e. All of the above

35
3
5

Reporting and Analysis with the SAS Add-In


In addition to the ability to access different types of data
sources, the SAS add-in enables you to use several
features of the platform for SAS Business Analytics,
including the following:
SAS reports

SAS Stored Processes

SAS tasks

SAS wizards

37
3
7

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-19

What Is a SAS Report?


SAS reports have these characteristics:
are documents created in a standard format and
stored in the SAS Folders structure in metadata
enable
applications
to share
results and
can provide
customization
capabilities
are created in
several of the
SAS platform
applications
38

What Is a SAS Stored Process?


A SAS Stored Process is a special type of SAS program.
Stored processes enable you to run a SAS program
and view the results in many different types of
SAS applications.
Stored processes consist of a SAS program file along with
a metadata definition that describes how the stored
process should execute.

39

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-20 Chapter 2 Overview of the Business User Reporting Applications

SAS Tasks and Wizards


A key feature of the SAS Add-In for Microsoft Office is the
ability to analyze data with interactive tasks and wizards.
A task provides a point-and-click interface to a specific
type of analysis or report that you can perform against
data.
Wizards provide a quick step-by-step mechanism for
accessing several of the SAS tasks by surfacing a limited
number of options.
Although both tasks and wizards generate SAS code
behind the scenes, you do not need to understand
SAS programming to use them.

40
4
0

2.05 Poll
A knowledge of programming is necessary to use
a SAS Stored Process.
True
False

42
4
2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-21

2.06 Multiple Choice Poll


Which of the following describes a SAS task?
a. An interactive table that analyzes and summarizes
data
b. A collection of data items and filters that describes
and provides a view of physical data
c. A SAS program that is stored on a server and that
can be executed as requested by client applications
d. A point-and-click interface to a specific type of
analysis or report that you can perform against data

45
4
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-22 Chapter 2 Overview of the Business User Reporting Applications

Using the SAS Add-In for Microsoft Office

This demonstration illustrates how to use the SAS add-in to access data from the server in Microsoft
Excel. You use that data to create analyses and reports and open existing reports into the various
Microsoft Office applications.
1. Open Excel by selecting Start All Programs Microsoft Office Microsoft Excel 2010.
2. Click the SAS tab from the Excel ribbon.

The instructions and displays in this course are specific to Microsoft Office 2010.

3. Select SAS Data.

The machines for this course are configured so that Jacques user credentials are saved in the
SAS connection profile of the SAS add-in.

You can change the connection profile information by selecting Tools Connections from
the SAS tab.
4. When the View SAS Data window appears, select Browse.

5. Verify that SAS Folders is selected in the selection pane on the left side of the Open Data Source
window.
6. Select Orion Star Open (or double-click Orion Star).
7. Select Marketing Department Open.
8. Select Data Open.
The Data folder displays a listing of all the data sources that you have permission to view.

Many of the displays in this course might contain information that is slightly different from
what you see on your classroom machine.
9. Select Orion Star Customers Open (or double-click the table name).

Although the Open Data Source window displays the metadata name of the data source
(Orion Star Customers), the filename (CUSTOMER_DIM) is displayed in the File name
field. The filename is also used in several other places in the SAS add-in.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-23

10. Select New worksheet in the Location section.

11. Type Customer Demographics as the name of the new worksheet.

Microsoft Excel imposes a 31-character limit for worksheet names. If your name is longer
than 31 characters, it will be truncated.

You can easily change the name of a worksheet after you add content to it. To rename a
worksheet, right-click on the tab and select Rename.
12. Click OK to load the data into the new worksheet.

13. The SAS Status for Microsoft Excel window appears by default. Click to close it.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-24 Chapter 2 Overview of the Business User Reporting Applications

Working with Data in Excel Using the SAS Add-In

Excel 2007 and Excel 2010 limit the number of rows and columns available in a worksheet to slightly
more than one million rows and 16,000 columns.
By adding data sources to your workbook using the SAS add-in, you can open data sources that are larger
than the limits imposed by Excel. The SAS add-in has options to set the number of rows to view at one
time, and provides a mechanism to select only the columns that you want to see.
1. Click the SAS tab from the Excel ribbon.
2. Click on the range of records (1-500) from the SAS tab to change the starting point

3. Type a value of 75,000 and then click OK.

The worksheet now displays records 75,00075,499.

The arrow tools in the Navigate section of the SAS tab enable you to scroll through the data. The
arrows with the bars next to them take you to the first or last page of the data. The single arrows scroll
one page of data at a time (500 records by default).

Specifying Options for the Status Window

1. Click to close the SAS Status for Microsoft Excel window.

2. Select Tools Options from the SAS tab.


3. Select the Results tab.
4. Clear the Show status window check box.
5. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-25

Examining the Customer Demographic Data

1. Use the One-Way Frequencies task to analyze the Customer Demographic data.
a. Select Tasks Describe One-Way Frequencies.
b. Accept the default values in the Input Data window and click OK.
The One-Way Frequencies window appears with the first item selected in the selection pane on the
left. The Data selection enables you to choose how you want to use each variable.

2. Select Customer Age and drag and drop it on top of the Analysis variables task role.
3. Select Customer Gender and drag and drop it on top of the Group analysis by task role.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-26 Chapter 2 Overview of the Business User Reporting Applications

4. Select Statistics from the selection pane on the left.


5. Select Frequencies only in the Frequency table options area.

6. Select Titles from the selection pane on the left.


7. Verify that Analysis is selected in the Section field.
8. Clear the Use default text check box.
9. Replace the default analysis title by typing Customer Age Analysis.

10. Select Footnote in the Section field.


11. Clear the Use default text check box.
12. Use the BACKSPACE or DELETE key to remove the default footnote.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-27

13. Click to view the SAS code that is created for you.

14. Click in the upper right corner of the Code Preview for Task window to close it.

15. Click Run to run the task and view the results.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-28 Chapter 2 Overview of the Business User Reporting Applications

The SAS program is submitted to the server for processing. When the processing is complete, the
results are returned to the new worksheet. Scroll down to see the values for both genders.

16. Use the Table Analysis task to further analyze the Customer Demographic data.
a. Select Tasks Describe Table Analysis.
b. Click the radio button for New Worksheet and accept the default name.
c. Click OK.
17. Select Customer Gender and drag and drop it on top of the Table variables task role.
18. Select Customer Country and drag and drop it on top of the Table variables task role.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-29

19. Select Tables from the selection pane on the left.


20. Select Customer Gender and drag and drop it on top of the <drag variables here> location in the
Preview area.
21. Select Customer Country and drag and drop it on top of the table graphic in the Preview area. The
completed preview should resemble the following:

22. Select Cell Statistics from the selection pane on the left.
23. Clear Column percentages.
24. Select Titles from the selection pane on the left.
25. Verify that Table Analysis is selected in the Section field.
26. Clear the Use default text check box.
27. Replace the default analysis title by typing Customer Gender Analysis.
28. Select Footnote in the Section field.
29. Clear the Use default text check box.
30. Use the BACKSPACE or DELETE key to remove the default footnote.
31. Click Run to run the task and view the results.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-30 Chapter 2 Overview of the Business User Reporting Applications

The SAS program is submitted to the server for processing and the results are returned to the new
worksheet.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-31

Sending the Results of the Tasks to Microsoft Word

When you create results in Excel, you can use the SAS add-in to send those results to a Word document or
PowerPoint presentation.
1. Select Manage Content on the SAS tab.
The Manage Content window appears and displays the SAS results in the current Excel workbook.

Data that was opened into a worksheet or PivotTable cannot be sent to Word or PowerPoint.

2. In this demonstration, you only want to send the table analysis results to Word. Click the
Table Analysis check box.
3. Click Send to.
4. Click the Send to Microsoft Word check box.

5. Click OK.
6. Click Close to close the Manage Content window.
7. Save the new workbook and close Microsoft Excel.
a. Select File Save As.
b. Navigate to S:\Workshop\sbaft43.
c. Type FT Customer Analysis in the File name field.
d. Click Save.
e. Click File Exit to close Microsoft Excel.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-32 Chapter 2 Overview of the Business User Reporting Applications

Using the SAS Add-In for Microsoft Office in Microsoft Word

The results of the Table Analysis are displayed in a new Microsoft Word document.

1. Use the scroll bar to scroll to the top of the output.


2. To change the output style used for these results in Word, click anywhere in the results.
3. Select the SAS tab.
4. Click Properties from the SAS tab.
The Properties window provides information about the selected results.
5. Click the Appearance tab.
6. Click Apply style.
7. Select Meadow.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-33

8. Select Refresh in the bottom left corner.

9. Click OK.
The results are re-created using the new style.

By default, the SAS Status for Microsoft Word window appears. You can select to not display
this window by setting the same option that you specified earlier in Excel. This option must
be set for each Microsoft Office application supported by the SAS add-in.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-34 Chapter 2 Overview of the Business User Reporting Applications

Using a Task to Create Additional Information from the Customer Data

1. Scroll to the bottom of the Word document and insert a new line after the frequency table.

Because SAS content is added to a Word document wherever the cursor is located, it is
important to pay attention to the cursor location.
2. If necessary, click the SAS tab.
3. Select Tasks Graph Pie Chart Wizard.
The SAS add-in remembers the last data source that you selected and uses it by default.
4. Click OK.
The Pie Chart wizard opens to the first step, which enables you to verify the data.
5. Click Next to move to Step 2.
6. Select Customer_Age_Group as the value for the Slice field.
7. Select (Percentage) as the value for the Slice size field.
8. Click the Group by check box.
9. Select Customer_Gender as the value for the Group by field.

The Sample chart area is updated to provide a visual representation of the chart that will be created
based on your selections.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-35

10. Click Next to move to Step 3.


11. Click the 3D chart check box.
12. Click Next to move to Step 4.
13. Change the value of the Graph title by typing Customer Age Group Analysis to replace the default
text.
14. Clear the default text in the Footnote field.

15. Click Finish.


The SAS program code is created for you and submitted to the server for processing. The results are
returned to the cursor location in the Word document.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-36 Chapter 2 Overview of the Business User Reporting Applications

16. Save the new document and close Microsoft Word.


a. Select File Save As.
b. Navigate to S:\Workshop\sbaft43.
c. Type FT Customer Analysis in the File name field.
d. Click Save.
e. Click File Exit to close Microsoft Word.

Running a Stored Process in Microsoft PowerPoint

1. Start PowerPoint by selecting Start All Programs Microsoft Office


Microsoft Office PowerPoint 2010.
2. Select Layout Blank to change the slide layout.
3. Change the default style used for the SAS output.
a. Click the SAS tab.
b. Select Tools Options.
c. Click the Results tab.
d. Click the Apply style check box.
e. Select Ocean.

f. Clear the Show status window check box.


g. Click OK.
4. Include the output from a stored process.
a. Click Reports.
b. If necessary, select SAS Folders on the left side of the window.
c. Select the Orion Star folder Open.
d. Select the Marketing Department folder Open.
e. Select the Stored Processes folder Open.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-37

f. Select the Sales by Order Type and Age Group stored process.
g. Click Open.
Because this stored process has a parameter, you are prompted to select a year.
h. Select 2007.
i. Click Run.
j. The results are added to the PowerPoint slide and a new slide is displayed. Select the first slide.

5. Save the new presentation and close Microsoft PowerPoint.


a. Select File Save As.
b. Navigate to S:\Workshop\sbaft43.
c. Type FT Sales by Order Type and Age Group in the File name field.
d. Click Save.
e. Click File Exit to close Microsoft PowerPoint.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-38 Chapter 2 Overview of the Business User Reporting Applications

Viewing SAS Reports and Stored Processes in Microsoft Outlook

1. Open Outlook by selecting Start All Programs Microsoft Office


Microsoft Outlook 2010.

2. Click the icon next to SAS Central (My Server) in the Outlook Navigation pane.

3. Click next to the Orion Star and Marketing Department folders to expand them.

4. Select the Reports folder.


After you select a folder, two other panes are displayed. The first new pane displays a list of reports
that you have permission to view. The second new pane displays the selected item.
5. Select Orion Star Sales Report.
6. Click Run.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.2 Exploring the SAS Add-In for Microsoft Office 2-39

The report is displayed.

7. Right-click on the Orion Star Sales Report and select Forward.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-40 Chapter 2 Overview of the Business User Reporting Applications

A new e-mail message window appears. The report is included in the body of the e-mail as well as a
link to view the report in SAS Web Report Studio.

8. Select File Close to close the new e-mail.


9. Click No when you are prompted to save the changes.
10. Select File Exit to close Microsoft Outlook.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-41

2.3 Exploring SAS Web Report Studio

Objectives
View a report in SAS Web Report Studio.
Use the online Help facility.

50

What Is SAS Web Report Studio?


SAS Web Report Studio is a reporting application that is
designed for business users who want to view, author,
and share reports on the Web.

51

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-42 Chapter 2 Overview of the Business User Reporting Applications

2.07 Poll
Have you ever created a SAS report using SAS Web
Report Studio?
Yes
No

53

SAS Web Report Studio Interface


SAS Web Report Studio requires
you to log on before you can access
and build reports.

After your credentials are


validated, the File menu provides
access to the various actions that
you can perform.

54

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-43

Role-Based Capabilities
Roles determine which user interface elements, known
as capabilities, a user sees when interacting with an
application.
SAS Web Report Studio is one of several SAS platform
applications that provide role-based capabilities.
Different users who access these applications might have
different interface elements available to them. What you
have access to in the classroom might also be different
from what you have access to at your site.

55

The ability to access the SAS Web Report Studio features, as well as access to the various
data sources and reports, is controlled by the platform administrator.

Viewing SAS Web Report Studio Reports


SAS Web Report Studio enables users, depending
on their role capabilities, to perform the following tasks:
Open existing reports

View reports

Navigate reports

56

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-44 Chapter 2 Overview of the Business User Reporting Applications

View Mode
View mode is used to view and interact with the contents
of the various report objects.

57

Creating Reports in SAS Web Report Studio


There are several options for creating reports in
SAS Web Report Studio, including the following:
Edit mode, which provides
full control over all aspects
of report creation
A report wizard that consists
of five steps
Templates that contain
report layout information

58

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-45

Edit Mode
Edit mode gives you
complete control
for designing and
editing reports. You
use the Data panel
and the report body
to construct your
report.

Report
Data Body
Panel

59

Table of Contents Panel


The Table of Contents panel is available in both Edit
mode and View mode, although the capabilities are
different. You can copy a section in either mode, but
you can only insert or rename a section or modify group
breaks in Edit mode.

Edit Mode View Mode

60

Whether you can copy a section in View mode is determined by your role.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-46 Chapter 2 Overview of the Business User Reporting Applications

Section Data Panel


The Section Data panel is available
in Edit mode and is used to select
the data source, data items, and
data attributes.

Depending on your assigned capabilities, you might


also have access to the Section Data panel in View
mode.

61

Report Body
The report body of Edit mode is used to select report
objects and control how they are positioned in the report
grid. Headers and footers can also be configured in this
section of Edit mode.

62

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-47

Creating a New Report


To create a new report in Edit mode, use one of these
methods:
Select File New Report.

Select New report from the Getting Started window.

63

Edit Mode
Edit mode gives you
complete control for
designing and
editing reports. You
use the Data panel
and the report body
to construct your
report.
Data
Panel Report
Body

64

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-48 Chapter 2 Overview of the Business User Reporting Applications

Edit Mode: Menu Bar


Much of the Edit mode functionality is available from the
menu bar.

65

Edit Mode: Menu Bar


Much of the Edit mode functionality is available from the
menu bar.

66

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-49

2.08 Multiple Choice Poll


Which of the following is true when creating a report in
Edit mode?
a. You are responsible for selecting the data but not for
creating the report layout.
b. You are responsible for creating the report layout but
not for specifying the data.
c. You are responsible for selecting the data and
creating the report layout.

68

Selecting Data in a Report


Most reports created in SAS Web Report Studio use data
sources. Each section of a report can have at most one
data source.
Some or all of the
data items in that
data source can
be selected, which
means that they
are available for
use in report objects, Each section in a
section filters, and report has its own
group breaks in that data selection.
section.

70

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-50 Chapter 2 Overview of the Business User Reporting Applications

Select Data Window


Create custom
The Select Data data items
window enables you to
select the data source
and existing data items.
The Select Data
window has other
features that enable
Rename
you to do the following: data items
View the data type
and description
Search for data
items
Rename data items Search for
View data type data items
Create custom data and description

71 items

You cannot rename hierarchies.

Section Data Panel


The Section Data panel is available
in Edit mode and is used to select
the data source, data items, and
data attributes. After the data source
is selected, the data items are
displayed in the Section Data panel.

Depending on your assigned capabilities, you might


also have access to the Section Data panel in View
mode.

72

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-51

Formatting Data
Some data items enable you to apply a format to
the underlying data. A format provides instructions
about how to display the data values in a report.

73

The initial formats are inherited from the data source.

If an alphanumeric category that is physically stored as character data does not have any
predefined formats available to choose from, then the Define a Format window is not available.

Limitations of Formatting Data Items


Complex formats cannot be specified in SAS Web Report
Studio. A BI content developer or data integration
developer could create those types of formats in the
information map.

74

In SAS Web Report Studio, predefined formats are available only if the data item is from a
relational data source and only if the data item was prepared by the data source administrator
to offer predefined formats.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-52 Chapter 2 Overview of the Business User Reporting Applications

Selecting and Positioning Report Objects


Use the report object icons at the top of the report body to
select report objects and position them in the report grid.
You can drag and drop the report icon to the desired
position in the report grid.

75

Types of Filters
There are two types of filters:
Section filters

Report object filters

Section filters apply to all


report objects in the section.

Report object filters further


subset data for only that
report object.

76
7
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-53

Section Filters
Section filters subset the data
for all of the report objects in
a selected section.

When you view a report, the


applied filter information is
displayed above each report
object by default.
77

Prompted Filters
A section filter can
be a prompted
filter. In this case,
the values within
the prompted filter
are obtained
immediately
before the report
section is run.

78

Prompted filters are used for report sections, stored processes, and information maps.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-54 Chapter 2 Overview of the Business User Reporting Applications

Using SAS Web Report Studio

This demonstration illustrates how to use SAS Web Report Studio to build a new report. You also modify
the initial report to add additional functionality.

1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.

On the classroom machines, do not use the 64-bit version of Internet Explorer.

2. From the browser window, select Favorites SAS Web Report Studio. The SAS Web Report
Studio logon page appears.

The URL used to access SAS Web Report Studio on the classroom machines is specific to the
classroom configuration. The URL used at your site will be different.
3. Type Eric in the User name field and use the password provided by your instructor.
4. Click Log On.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-55

5. Select File Open.


6. Double-click Orion Star to expand the folder.
7. Double-click Marketing Department to expand the folder.
8. Double-click Information Maps to expand the folder.
9. Double-click Orion Star Customer Orders Data.
When you open a data source in SAS Web Report Studio, a default report is created and opened in
View mode.

10. Click the Edit tab to modify the report by selecting additional data items and changing the report
objects to display the data differently.
11. Select Data Select Data to choose additional data items.
a. Double-click Company to remove it from the Selected data items list box.
b. Click OK in the message window.
c. Double-click Customer Age Group to remove it from the Selected data items list box.
d. Click OK in the message window.
e. Double-click Customer Country to add it to the Selected data items list box.
f. Double-click Customer Gender to add it to the Selected data items list box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-56 Chapter 2 Overview of the Business User Reporting Applications

g. Double-click Quantity Ordered to add it to the Selected data items list box.
h. Double-click Total Retail Price For This Product to add it to the Selected data items list box.

i. Select Cost Price Per Unit in the Selected data item list box. Click repeatedly to move the
data item between Quantity Ordered and Total Retail Price For This Product.
The Select Data window should resemble the following:

j. With Cost Price Per Unit selected, click near the bottom right corner of the window.

k. Type Total Cost in the New name field.

l. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-57

m. Select Total Retail Price For This Product in the Selected data item list box.

n. Click .

o. Type Total Retail Price in the New name field.


p. Click OK.
q. Click OK to close the Select Data window.
12. Remove the List report object.
a. Click the List report object in the report grid to select it.
b. Right-click and select Remove Table.

c. Click OK in the message window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-58 Chapter 2 Overview of the Business User Reporting Applications

d. Add a Crosstab report object.

1) Click (the Insert Crosstab icon) to inset a crosstab report object into the open cell of the
report grid.
2) Right-click the new crosstab tab object and select Assign Data.
3) Verify that the data items assignments match the following:

e. Click OK.
13. Click the report grid cell with the crosstab object to select it.
14. Click (the Insert Row After icon) to add a new row to the report grid.

15. Add a Bar-Line report object.


a. Click (the Insert Bar-Line Chart icon) to insert a bar-line chart report object into the open cell
of the report grid.
b. Right-click the new bar-line chart object and select Assign Data.
c. Click Quantity Ordered and drag it to the Hidden role.
d. Click Total Retail Price and drag it to the Bar Height role.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-59

The data items assignments should match the following:

e. Click OK.
16. Add a header to the report.
a. Click Header and select Edit.
b. Select Orion Star Report Header as the value for the Banner image field.

c. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-60 Chapter 2 Overview of the Business User Reporting Applications

17. Click the View tab to view the report.

18. Save the report.


a. Select File Save As.
b. Type FT Customer Order Summary in the Name field.
c. Save the report in the Orion Star Marketing Department Reports folder by double-
clicking the folder names.
d. Click Save.
19. Filter the report to only display values for specific countries.
a. Click the Edit tab to modify the report.
b. Select Data Section Filters.
c. Click New.
d. Type Nordic Countries in the Filter Name field.
e. Verify that Customer Country is selected as the value for the Data item field.
f. Verify that Is equal to is selected as the value for the Operator field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.3 Exploring SAS Web Report Studio 2-61

20. Click the Filter on formatted values check box.


21. Click Get Values.
22. Double-click the following countries to move them to the Selected values list box:
Denmark
Finland
Norway
Sweden

23. Click OK to close the Create Custom Filter window.


24. Click OK to close the Section Filters window.
25. Click the View tab to view the report.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-62 Chapter 2 Overview of the Business User Reporting Applications

The report is updated and only displays values for the selected countries.

26. Save the report under a new name.


a. Select File Save As.
b. Type FT Nordic Customer Order Summary in the Name field.
c. Save the report in the Orion Star Marketing Department Reports folder by double-
clicking the folder names, if necessary.
d. Click Save.
27. Click Log Off Eric to log off from SAS Web Report Studio.
28. Select File Exit to close the browser.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-63

2.4 Exploring the SAS Information Delivery Portal

Objectives
Define the SAS Information Delivery Portal.
Distinguish between the two methods of
organizing portal content: pages and portlets.
List the types of content that can be presented
in the portal.

82
8
2

SAS Information Delivery Portal


The SAS Information Delivery Portal is a Web-based
interface that enables you to view and organize content.

83
8
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-64 Chapter 2 Overview of the Business User Reporting Applications

Portal Organization
The portal uses pages and portlets to deliver customized
information to your Web browser.

Pages

Portlet

84
8
4

Pages
A page is a method of organizing information in the portal.
You can create, add, edit, rearrange, and remove pages
from your portal view.
This view
contains
two pages.

85
8
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-65

Portlets
A portlet is a rectangular display component of the portal
in which content and links to content are displayed.
You can create, add, edit, rearrange, and remove portlets
on a page.
This page
contains
four portlets.

86
8
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-66 Chapter 2 Overview of the Business User Reporting Applications

Portal Content Types


There are many types of content that might be presented
within portlets on a page, including the following:
Links

SAS Information Maps

SAS reports

SAS Stored Processes


SAS BI Dashboards

SAS Packages

Publication channels

Syndication channels

87
8
7

Links represent content that is accessible using a Uniform Resource Locator (URL).
SAS Information Maps are a collection of data items and filters that provide a business-specific view
of physical data.
SAS reports are documents created in a standard format and stored in the SAS Folders structure in
metadata.
SAS Stored Processes are SAS programs that are stored in a central location.
SAS BI Dashboards surface information in a graphical format.
SAS packages are a combination of various SAS files such as reports, stored processes, and data sets.
Publication channels are channels that are established using the SAS Publishing Framework and that can
be used to publish information to users and applications.
Syndication channels are channels that provide syndicated, continuously updated Web content. One or
more syndication channels can be available for you to access in the portal.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-67

2.09 Multiple Choice Poll


Which of the following best defines a SAS Stored Process?
a. A collection of data items and filters that provides
a business-specific view of physical data
b. A rectangular display component of the portal in
which content and links to content are displayed
c. A standardized format that enables SAS applications
to share results and sometimes gives users the ability
to customize the results
d. A SAS program that is stored in a central location
that can be executed from the portal and includes
the most current data

89
8
9

2.10 Multiple Choice Poll


Which of the following best defines a SAS report?
a. A collection of data items and filters that provides
a business-specific view of physical data
b. A rectangular display component of the portal in
which content and links to content are displayed
c. A standardized format that enables SAS applications
to share results and sometimes gives users the ability
to customize the results
d. A SAS program that is stored in a central location
that can be executed from the portal and includes
the most current data

91
9
1

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-68 Chapter 2 Overview of the Business User Reporting Applications

2.11 Multiple Choice Poll


Which of the following best defines a SAS Information Map?
a. A collection of data items and filters that provides
a business-specific view of physical data
b. A rectangular display component of the portal in
which content and links to content are displayed
c. A standardized format that enables SAS applications
to share results and sometimes gives users the ability
to customize the results
d. A SAS program that is stored in a central location
that can be executed from the portal and includes
the most current data

93
9
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-69

Using the SAS Information Delivery Portal

This demonstration illustrates how to access a predefined portal view and interact with existing SAS
content.
1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS Information Delivery Portal.
The SAS Information Delivery Portal logon page appears.

The URL used to access SAS Information Delivery Portal on the classroom machines is
specific to the classroom configuration. The URL used at your site will be different.
3. Type Eric in the User name field and use the password provided by your instructor.
4. Click Log On.
The SAS Information Delivery Portal appears and displays Erics predefined portal view.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-70 Chapter 2 Overview of the Business User Reporting Applications

5. Interact with the SAS BI Dashboard portlet.


The SAS BI Dashboard portlet (named Marketing Dashboard) displays a single dashboard. Each
dashboard can contain many different types of dashboard indicators. The DSH_Marketing Dashboard
contains two indicators, a spark table named IND_Sales Detail by Company and a tile chart named
IND_Sales by Company.

a. Click on the Orion France tile in the tile chart. Because this dashboard has a brush interaction
defined between both indicators, the corresponding row in the spark table is highlighted.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-71

b. Select Orion Belgium in the spark table. In this dashboard, the interaction between the indicators
is defined in both directions so the corresponding tile is highlighted in the tile chart.

6. Use the SAS Collection portlet (named My SAS Collection) to run a stored process.
a. Double-click Sales by Order Type and Age Group.
b. Accept the default value when you are prompted to select a year and click Run.
The results appear in a new browser window.

c. Select File Exit to close the secondary browser window.


d. Click Portal Page to return to Erics portal view.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-72 Chapter 2 Overview of the Business User Reporting Applications

7. Use the SAS Navigator portlet to locate and open an information map.
The SAS Navigator portlet is used to navigate through the SAS Folders to select items to view.

a. Double-click Orion Star Marketing Department Information Maps.


b. Double-click the Orion Star Customer Orders Data information map.
When you choose to open an information map in the portal, SAS Web Report Studio opens and
displays a default view of the data surfaced by the information map.

c. Click Portal in the upper left corner to return to the portal.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-73

8. Use the SAS Report portlet to view a report and access SAS Web Report Studio.
The SAS Report portlet (named Sales Distribution by Product Line) displays a single
SAS report.

a. Click to open the report in SAS Web Report Studio.

This report contains multiple sections.

b. Select AU and NZ Sales OLAP from the Table of Contents area.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-74 Chapter 2 Overview of the Business User Reporting Applications

This report section contains a crosstab report object with conditional highlighting. The data
source for this report is an information map based on an OLAP cube. Therefore, the values in the
columns and rows provide icons for navigating through the dimensional hierarchies.

c. Click Portal in the upper left corner to return to the portal.


9. Use the SAS BI Dashboard portlet to open the Dashboard Designer in SAS BI Dashboard.
a. Use the scroll bars in the portal to locate the SAS BI Dashboard portlet.

b. Click (the Manage Dashboards icon) in the right corner to open the Dashboard Designer.

c. In the Object pane on the left side of the window, double-click Orion Star
Marketing Department Dashboards.
d. Double-click RNG_Sales by Company.rdx to open the range.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Exploring the SAS Information Delivery Portal 2-75

e. Type 2,700 in Lower Value column in the second interval range.


f. Type 11,000 in Lower Value column in the fourth interval range.

g. Select File Save to save the changes to the range.


h. Select File Close to close the range and display the dashboard.
i. Select File Refresh to update the dashboard with the new range values.

j. Click Return to Portal in the upper right corner to return to the portal.
10. Click Log Off Eric in the upper right corner to log off from the portal.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-76 Chapter 2 Overview of the Business User Reporting Applications

2.5 Defining the BI Content Developer Role and Applications

Objectives
Describe the applications typically used by BI content
developers.
Describe the types of SAS objects used for reporting
and analysis, and which of the SAS applications support
each type.

98
9
8

BI Content Developer (Review)


BI content developers understand not only their
organizations data, but also the applications
required to create reports and analyses suitable
for business users and other information
consumers.
The software and applications primarily used by
BI content developers include the following:
SAS BI Dashboard

SAS Enterprise Guide

SAS Information Map Studio

SAS OLAP Cube Studio

SAS Stored Processes

SAS Visual BI

99
9
9

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-77

Interacting with Business Users


In many organizations,
BI content developers and
business users work in
the same group or on
the same team.
In most cases, it is the BI content developer that creates
content that is consumed by the business users.
It is important for a BI content developer to understand
what types of information the business users need to
access and which applications they use most often.

100
1
0
0

SAS BI Dashboard
SAS BI Dashboard enables you to build and interact with
dashboards to visualize your data sources using key
performance indicators (KPIs) and other graphical views.
SAS BI Dashboards can be built from several types of
data sources. These data sources can be used with many
different graphical display types for presenting information
in an easy-to-understand way.

SAS BI
Dashboard

101

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-78 Chapter 2 Overview of the Business User Reporting Applications

SAS Enterprise Guide


SAS Enterprise Guide provides an intuitive, visual
interface to the power of SAS. SAS Enterprise Guide
provides the following functionality:
Transparent access to SAS and other types of data

Interactive tasks and wizards for reporting


and analysis
The ability to export
results to other
applications and
to the Web
SAS
Enterprise
Guide

102

SAS Information Map Studio


SAS Information Map Studio enables you to build
information maps from different types of data sources.
Information maps provide the following capabilities:
Act as a bridge between your data warehouse
and business users
Incorporate business
rules and eliminate
the need to understand
SAS Information
data relationships Map Studio

103

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-79

SAS OLAP Cube Studio


SAS OLAP Cube Studio includes a Cube Designer
Wizard that enables you to do the following:
Enter information about the data source that is used
to load the cube
Define dimensions, hierarchies, and levels

Provide measure details


and configure
aggregations
SAS OLAP
Cube Studio

104

SAS Visual BI (JMP)


SAS Visual BI, powered by JMP software, provides data
visualization capabilities and interactive statistical
graphics to the platform for SAS Business Analytics.

105

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-80 Chapter 2 Overview of the Business User Reporting Applications

SAS Objects for Reporting and Analysis


Many different types of SAS objects are used for reporting
and analysis, including the following:
BI dashboards

Information maps

OLAP cubes

Reports
Stored processes

Tables

Tasks and wizards

106

How Do the SAS Objects Fit Together?


There are relationships between the different types
of SAS objects used for reporting and analysis.

Table

Stored
Process
Tasks and BI SAS
Wizards Dashboard Report
Information
Map

OLAP
Cube
107

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-81

SAS Platform Applications and SAS Objects


The different SAS objects can be used by many of the
SAS platform applications. Depending on the application,
some objects can be used as data sources and others
can deliver their content to the application.

108
1
0
8

What Is the SAS Prompting Framework?


The SAS Prompting Framework provides a standard way
for passing user selections to the various SAS platform
applications.
The prompting framework has the following
characteristics:
Provides a consistent user interface across
applications
Is customizable to meet the needs of various user
input requirements
Creates an interactive mechanism for requesting user
input

109

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-82 Chapter 2 Overview of the Business User Reporting Applications

Dynamic Subsetting of Data


The SAS Prompting Framework, which is available from
many of the SAS platform applications, provides a
common interface for requesting user input.

SAS Add-In for SAS Web SAS Information SAS Data SAS Information SAS Visual BI SAS Enterprise
Microsoft Office Report Studio Delivery Portal Integration Studio Map Studio Guide

110

Two Parts of Prompting


The prompting framework can be divided into two parts.

Design time Prompts can be created in several


of the SAS platform applications.
Run time Prompts are displayed in a similar
manner in all of the SAS platform
applications that support them.

111

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-83

2.12 Multiple Answer Poll


Which of the following are true about the SAS Prompting
Framework?
a. It provides a common mechanism to request user
input.
b. It is available from many of the SAS platform
applications.
c. It provides the ability to design and use prompts.

113

Creating Prompts
When creating prompts, you begin by specifying general
information. You then define the prompt type and specify
how the prompt values are populated.

115

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-84 Chapter 2 Overview of the Business User Reporting Applications

Discussion

When would you want to use the following


prompt options?
Hide from user

Requires a
non-blank value
Read-only values

116

Prompt Categories
In addition to the different types of prompts provided by
the SAS Prompting Framework, several categories of
prompts provide additional functionality, including the
following:
Dynamic prompts

Cascading prompts

Relative date/time prompts

Range prompts

117

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-85

Dynamic Prompts
Dynamic prompts populate a list of possible values from
a dynamic data source. The list is generated at run time
rather than at design time.
Depending on the SAS application where the prompt
is built, the data source can be a physical table or an
information map based on relational tables.

118

Cascading Prompts
Cascading prompts populate prompt values based on
selections in other prompts.
Example: When a department is selected, the list of
sections is dynamically generated based
on the selected department.

119

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-86 Chapter 2 Overview of the Business User Reporting Applications

Relative Date/Time Prompts


In addition to being able to specify an exact date or time
(or both) for a prompt value, relative date/time prompts
enable you to incorporate relative time frames into
prompting.

120

Range Prompts
Range prompts enable users to enter ranges of values,
such as minimum and maximum, in one combined prompt.
Range prompts provide the user with
one question to answer instead of two
and ensure that both values are entered.

Date/time range prompts enable you


to select from different range types.

121

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-87

Discussion

What are the benefits of using range prompts?

122

Shared Prompts
In addition to prompts being defined for a specific use,
prompts can be shared.
Shared prompts are stored in metadata and can be used
in multiple applications.
The benefits of shared prompts include the following:
A single point of maintenance

The ability to create prompts with complex


configurations one time
Sharing prompt functionality across multiple
applications within the organization

123

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-88 Chapter 2 Overview of the Business User Reporting Applications

Using the SAS Prompting Framework


At run time, the SAS Prompting Framework provides a
standard way for passing users selections to the various
SAS platform applications.
The prompting framework provides assistance with
finding and selecting values.

Because there are different types of SAS


platform applications, the way that the
prompting framework displays information
is slightly different between desktop
applications and Web applications.

124
1
2
4

Using Dynamic Prompts


Dynamic prompts provide an interface that enables you
to search for the values that meet a specific criterion.

125

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.5 Defining the BI Content Developer Role and Applications 2-89

Using Date/Time Prompts


Date/time prompts provide an
interface that enables you to select
values using a calendar or clock.

126
1
2
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-90 Chapter 2 Overview of the Business User Reporting Applications

2.6 Solutions to Student Activities (Polls/Quizzes)

2.04 Multiple Choice Poll Correct Answer


Which of the following data sources can be accessed
with the SAS Add-In for Microsoft Office?
a. SAS relational data sources
b. Excel data sources
c. SAS Information Maps
d. OLAP cubes
e. All of the above

36
3
6

2.05 Poll Correct Answer


A knowledge of programming is necessary to use
a SAS Stored Process.
True
False

43
4
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.6 Solutions to Student Activities (Polls/Quizzes) 2-91

2.06 Multiple Choice Poll Correct Answer


Which of the following describes a SAS task?
a. An interactive table that analyzes and summarizes
data
b. A collection of data items and filters that describes
and provides a view of physical data
c. A SAS program that is stored on a server and that
can be executed as requested by client applications
d. A point-and-click interface to a specific type of
analysis or report that you can perform against data

46
4
6

2.08 Multiple Choice Poll Correct Answer


Which of the following is true when creating a report in
Edit mode?
a. You are responsible for selecting the data but not for
creating the report layout.
b. You are responsible for creating the report layout but
not for specifying the data.
c. You are responsible for selecting the data and
creating the report layout.

69

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-92 Chapter 2 Overview of the Business User Reporting Applications

2.09 Multiple Choice Poll Correct Answer


Which of the following best defines a SAS Stored Process?
a. A collection of data items and filters that provides
a business-specific view of physical data
b. A rectangular display component of the portal in
which content and links to content are displayed
c. A standardized format that enables SAS applications
to share results and sometimes gives users the ability
to customize the results
d. A SAS program that is stored in a central location
that can be executed from the portal and includes
the most current data

90
9
0

2.10 Multiple Choice Poll Correct Answer


Which of the following best defines a SAS report?
a. A collection of data items and filters that provides
a business-specific view of physical data
b. A rectangular display component of the portal in
which content and links to content are displayed
c. A standardized format that enables SAS applications
to share results and sometimes gives users the ability
to customize the results
d. A SAS program that is stored in a central location
that can be executed from the portal and includes
the most current data

92
9
2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.6 Solutions to Student Activities (Polls/Quizzes) 2-93

2.11 Multiple Choice Poll Correct Answer


Which of the following best defines a SAS Information Map?
a. A collection of data items and filters that provides
a business-specific view of physical data
b. A rectangular display component of the portal in
which content and links to content are displayed
c. A standardized format that enables SAS applications
to share results and sometimes gives users the ability
to customize the results
d. A SAS program that is stored in a central location
that can be executed from the portal and includes
the most current data

94
9
4

2.12 Multiple Answer Poll Correct Answers


Which of the following are true about the SAS Prompting
Framework?
a. It provides a common mechanism to request user
input.
b. It is available from many of the SAS platform
applications.
c. It provides the ability to design and use prompts.

114

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2-94 Chapter 2 Overview of the Business User Reporting Applications

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 3 Overview of Data
Management

3.1 Understanding SAS Data Integration Capabilities....................................................... 3-3

3.2 Creating Data Sources for Reporting and Analysis .................................................... 3-8
Demonstration: Creating a New SAS Data Integration Studio Job ...................................... 3-12

3.3 Creating Data Sources Using SAS Enterprise Guide ................................................ 3-23
Demonstration: Creating Data Sources with a SAS Enterprise Guide Job ......................... 3-30

3.4 Building an OLAP Cube ............................................................................................... 3-35


Demonstration: Building an OLAP Cube ............................................................................. 3-46

3.5 Solutions to Student Activities (Polls/Quizzes) ......................................................... 3-54

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-2 Chapter 3 Overview of Data Management

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.1 Understanding SAS Data Integration Capabilities 3-3

3.1 Understanding SAS Data Integration Capabilities

Objectives
Describe the benefits of SAS Data Management.
List the SAS platform applications for data
management.

SAS Data Management


SAS Data Management
ACCESS VALIDATE ENHANCE DISTRIBUTE

SAS Data Management provides applications and


processes to perform the following tasks:
Use pre-built, high-performance capabilities across the
data management lifecycle
Ensure reliability through profiling capabilities and the
ability to incorporate data-quality business rules
across data sources and platforms

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-4 Chapter 3 Overview of Data Management

SAS Data Management Applications (Review)


Several SAS platform applications enable you to perform
data management tasks.

SAS Platform Applications

Data Management Analytics Reporting

SAS Data Integration Studio SAS Enterprise Guide SAS Information Delivery Portal

DataFlux dfPower Studio SAS Enterprise Miner SAS BI Dashboard

SAS OLAP Cube Studio SAS Visual BI (JMP) SAS Web Report Studio

SAS Information Map Studio SAS Forecast Studio SAS Add-In for Microsoft Office

SAS Data Integration Studio


SAS Data Integration Studio provides a single point of
control for many tasks, including the following:
Managing data sources, data targets, and processes

Creating jobs that organize a set of sources, targets,


and processes
Managing source
code that
is generated by
SAS Data
Integration
Studio or created
by you

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.1 Understanding SAS Data Integration Capabilities 3-5

DataFlux dfPower Studio


DataFlux (a SAS company) provides dfPower Studio,
which combines advanced data-profiling capabilities with
proven data-quality, integration, and augmentation tools
for incorporating data quality into a data collection and
management process.

SAS OLAP Cube Studio (Review)


SAS OLAP Cube Studio includes a Cube Designer
Wizard that enables you to do the following:
Enter information about the data source that is used to
load the cube
Define dimensions, hierarchies, and levels

Provide measure details


and configure
aggregations
SAS OLAP
Cube Studio

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-6 Chapter 3 Overview of Data Management

SAS Information Map Studio (Review)


SAS Information Map Studio enables you to build
information maps from different types of data sources.
Information maps provide the following capabilities:
Act as a bridge between your data warehouse and
business users
Incorporate business
rules and eliminate
the need to understand
SAS Information
data relationships Map Studio

Data Integration and SAS Enterprise Guide


Both SAS Data Integration applications and SAS
Enterprise Guide can access data and generate
SAS code. There are many differences between these
two products, including the audience for which they were
created.
SAS Data Integration applications are primarily used by
data integration developers to manage data sources for
an enterprise.
SAS Enterprise Guide is primarily used by business
analysts.

10 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.1 Understanding SAS Data Integration Capabilities 3-7

Data Integration and SAS Enterprise Guide


Although SAS Enterprise Guide can also be used to
manage data sources, the SAS Data Integration
applications provide more control for the creation and
management of enterprise data sources.
SAS Data Integration Studio uses metadata to define the
data sources, data targets, ETL processes, and so on.
SAS Enterprise Guide uses projects to organize similar
information such as data sources, SAS program code,
tasks, and so on.

11
11

SAS Information Maps and Data Integration


Although SAS Information Map Studio can build
information maps by combining multiple relational data
sources, it should not be confused with data integration
applications.
Data integration applications typically process operations
data sources and create new data sources for reporting
and analysis.
Information maps provide access to the new data sources
and enable you to add the following:
Filters and prompting

Formatting and aggregation instructions

Calculated data items

12

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-8 Chapter 3 Overview of Data Management

3.2 Creating Data Sources for Reporting and Analysis

Objectives
State the purpose of SAS Data Integration Studio.
Explore the available interfaces.

15

What Is SAS Data Integration Studio?


SAS Data Integration Studio is a visual design tool for
building, implementing, and managing data integration
processes,
regardless
of data
sources,
applications,
or platforms.

16

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-9

SAS Data Integration Studio and Metadata


Through its metadata, SAS Data Integration Studio
provides a single point of control for managing the
following resources:
Data sources from any platform that is accessible to
SAS and from any format that is accessible to SAS
Data targets to any platform that is accessible to SAS
and to any format that is supported by SAS
Processes that specify how data is extracted,
transformed, and loaded from a source to a target
Jobs that organize a set of sources, targets, and
processes (transformations)
Source code that is generated by SAS Data Integration
Studio
User-written source code
17

SAS Data Integration Studio Interface


SAS Data Integration Studio has many components
available in the desktop interface.

18

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-10 Chapter 3 Overview of Data Management

Title Bar, Menu Bar, Toolbar, Status Bar


Title Bar

Menu Bar

Toolbar

Status Bar

19

Tree View, Basic Properties Pane

Tree View

20

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-11

Job Editor

Job Editor

21

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-12 Chapter 3 Overview of Data Management

Creating a New SAS Data Integration Studio Job

This demonstration illustrates how to build a SAS Data Integration Studio job to read and combine data
sources to create a new table for reporting and analysis.

1. Select Start All Programs SAS SAS Data Integration Studio 4.2.
2. Log on with Ellens credentials.
a. Verify that the connection profile is My Server.

Do not select the Set this connection profile as the default check box.

b. Click OK to close the Connection Profile window and access the Log On window.
c. Type Ellen in the User ID field and use the password provided by your instructor.

Do not select the Save user ID and password in this profile check box.

d. Click OK to close the Log On window and log on.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-13

SAS Data Integration Studio appears.

3. Create a new job.


a. Select File New Job.
b. Type FT Load US Customer Subset in the Name field.
c. Click Browse next to the Location field.
1) Navigate to SAS Folders Orion Star Sales Department Jobs.
2) Click OK to close the Select a Location window.
d. Click OK to close the New Job window.
4. Add two existing source tables to the job.
a. Using the Folders tab, navigate to Orion Star Sales Department Data.
b. Drag CUSTOMER_DIM to the job window.
c. Drag PRODUCT_DIM to the job window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-14 Chapter 3 Overview of Data Management

5. Add a new external file to the job.


a. Select File New External File Delimited.
b. Type FT Subset in the Name field.
c. Click Browse next to the Location field.
1) Navigate to SAS Folders Orion Star Sales Department Data.
2) Click OK.
d. Click Next.
e. Click Browse next to the File name field.
1) Navigate to S:\Workshop\sbaft43.
2) Change the value of the Type field to Delimited Files (*.csv).
3) Select FT_Subset.csv.

4) Click OK.
f. Click Next.
g. Clear the check box for the Blank delimiter.
h. Click the check box for the Comma delimiter.

i. Click Next.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-15

j. Click Auto Fill.


k. Type 2 in the Start record field.

l. Click OK.
m. Click Import.
n. Select Get the column names from the column headings in this file.

o. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-16 Chapter 3 Overview of Data Management

p. Click Refresh to view the source data values.

q. Click the Data tab.


r. Click Refresh to view the imported data values.

s. Click Next.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-17

t. Click Finish.
u. Drag FT_Subset from the Folders tab to the job window.
6. Add a File Reader transformation.
a. Click the Transformations tab.
b. Expand the Access group.
c. Drag the File Reader transformation to the job.
7. Connect the FT Subset external file to the File Reader transformation.
a. Move the cursor over the right side of the FT Subset item until you see the pencil icon.
b. Drag the pencil icon to the File Reader transformation to connect the two items.
8. Add an SQL Join transformation.
a. If necessary, click the Transformations tab.
b. Expand the Data group.
c. Drag the SQL Join transformation to the job.
d. Connect the CUSTOMER_DIM table to the first input port of the SQL Join transformation.
e. Connect the PRODUCT_DIM table to the second input port of the SQL Join transformation.
f. Add an input port to the SQL Join transformation.
1) Right-click the SQL Join transformation.
2) Select Ports Add Input Port.
g. Connect the File Reader transformation to the third input port of the SQL Join transformation.
The job should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-18 Chapter 3 Overview of Data Management

9. Add a Table Loader transformation.


a. If necessary, click the Transformations tab.
b. If necessary, expand the Access group.
c. Drag the Table Loader transformation to the job.
d. Connect the SQL Join transformation to the Table Loader transformation.
10. Create a new target table.
a. Select File New Table.
b. Type FT US Customer Subset in the Name field.
c. Verify that the value of the Location field is /Orion Star/Sales Department/Data.
If it is not, click Browse and complete the steps below:
1) Navigate to SAS Folders Orion Star Sales Department Data.
2) Click OK.
d. Click Next.
e. Verify that SAS is selected as the value for the DBMS field.
f. Select New next to the Library field.
1) Type FT Library in the Name field.
2) Verify that that value of the Location field is /Orion Star/Sales Department/Data.
3) Click Next.
4) Double-click SASApp to move it to the Selected servers list box.
5) Click Next.
6) Type FTLib in the Libref field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-19

7) Click New below the Path Specification lists.


a) Click Browse next to the Paths field.
b) Navigate to S: Workshop sbaft43.
c) Click OK to close the Browse window.
d) Click OK to close the New Path Specification window.

8) Click Next.
9) Click Finish.
g. Click Next.
h. Select the columns for the new table.
1) Expand Orion Star Sales Department Data.
2) Select FT Subset.

3) Click to move all of the variables from that table to the Selected items list box.

4) Expand CUSTOMER_DIM.
5) Double-click the following variables to move them to the Selected items list box:
Customer_Country
Customer_Gender
Customer_Name
Customer_BirthDate
Customer_Age_Group
Customer_Age
6) Expand PRODUCT_DIM.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-20 Chapter 3 Overview of Data Management

7) Double-click the following variables to move them to the Selected items list box:
Product_Line
Product_Category
Product_Group
Product_Name
Supplier_Country
Supplier_Name
8) Click Next.
i. Accept the default column attributes.
j. Click Next.
k. Click Finish.
l. Using the Folders tab, navigate to Orion Star Sales Department Data.
m. Drag FT US Customer Subset to the job window.
n. Connect the Table Loader transformation to the FT US Customer Subset table.
The job flow should resemble the following:

11. Modify the join criteria.


a. Right-click the SQL Join transformation and select Open.
b. Select Where in the Navigate pane.
The default join criteria is joining the PRODUCT_DIM table and the output of the File Reader
transformation by Product_ID. You need to modify the criteria to also join the
CUSTOMER_DIM table with the output of the File Reader transformation.
c. Click New.
d. Click in the first Operand column of the new row and select Choose column(s).
e. Expand the CUSTOMER_DIM table.
f. Select Customer_ID.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.2 Creating Data Sources for Reporting and Analysis 3-21

g. Click OK.
h. Click in the second Operand column of the new row and select Choose column(s).
i. Expand the File Reader item.
j. Select Customer_ID.
k. Click OK.
The WHERE clause should resemble the following:

l. Click to return to the process flow for the job.

12. Click to run the job and create the new table.

The Status tab in the Details window indicates the status of each step of the job.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-22 Chapter 3 Overview of Data Management

13. Right-click the FT US Customer Subset table and select Open.

14. Use the scroll bars to view the columns and rows of data to ensure that the table was populated
correctly. There should be 2,590 rows of data and there will be missing values for the discount
column in most, but not all, of the rows.
15. Select File Close to close the View Data window.
16. Select File Save to save the job.
17. Select File Close to close the job window.
18. Select File Exit to close SAS Data Integration Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.3 Creating Data Sources Using SAS Enterprise Guide 3-23

3.3 Creating Data Sources Using SAS Enterprise Guide

Objectives
State the capabilities and major features of
SAS Enterprise Guide software.
Define the purpose of SAS Enterprise Guide projects.

25

SAS Enterprise Guide


SAS Enterprise Guide provides a point-and-click interface
for manipulating data and generating reports.

26

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-24 Chapter 3 Overview of Data Management

Tasks and Wizards


You can manipulate data or create results entirely through
the point-and-click interface using tasks or wizards.

27

Tasks and Wizards


Many of the same tasks and wizards
that are available in SAS Enterprise
Guide are also available in the
SAS Add-In for Microsoft Office.
SAS Enterprise Guide provides
additional tasks and other functionality
that enable you to access and
manipulate a variety of data sources
as well as create advanced analyses
and reports.

28

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.3 Creating Data Sources Using SAS Enterprise Guide 3-25

SAS Enterprise Guide Capabilities


Users of varying experience levels can use
SAS Enterprise Guide as one of the applications
for data processing, reporting, and analytics:
Users with no knowledge of the SAS programming
language can use the point-and-click functionality
offered through SAS Enterprise Guide tasks and
queries.
SAS programmers can use SAS Enterprise Guide
as the primary programming interface to write and
edit SAS programs.
Users of the platform for SAS Business Analytics can
use SAS Enterprise Guide to create stored processes,
view OLAP cubes, create and view SAS reports, and
perform other tasks.
29

Enhance Programs with Custom Code


When you manipulate data or create results through the
point-and-click interface, SAS Enterprise Guide generates
SAS code for you. Custom code can be inserted at
structured points while defining a task.

30

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-26 Chapter 3 Overview of Data Management

Customizing Code Generated with Tasks


After defining a task, you can save, edit, and completely
customize the code generated by a task.

31

Writing Code with SAS Enterprise Guide


SAS Enterprise Guide also enables you to write, include,
edit, and submit your own SAS programs.

32 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.3 Creating Data Sources Using SAS Enterprise Guide 3-27

Writing Code with SAS Enterprise Guide


SAS Enterprise Guide Program Editor features:
Code autocompletion that suggests appropriate
keywords, statements, options, libraries, data sets,
and variables
In-line help

Automatic code formatting and program structure


analysis
Color coding to emphasize syntax structure and
identify errors
Highlighting of pairs of parentheses, brackets, and
braces to prevent leaving pairs open-ended

33

Combine Point-and-Click with Programming


As an experienced business analyst, you can combine
the point-and-click functionality of SAS Enterprise Guide
with your knowledge of SAS code to easily create,
update, and share your results.

34

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-28 Chapter 3 Overview of Data Management

3.01 Quiz
Do you need to learn SAS programming code to
successfully use SAS Enterprise Guide?
Yes
No

36

What Is a SAS Enterprise Guide Project?


A project is an organizational structure used by SAS
Enterprise Guide. A project is a collection of any of the
following:
Links to data sources

Tasks and queries

Results

SAS programs
and logs
Informational
notes for
documentation

38

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.3 Creating Data Sources Using SAS Enterprise Guide 3-29

Create Automatically Formatted Results


Results generated by tasks or user-written code are
automatically formatted as HTML, PDF, RTF, text,
or SAS reports.

39

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-30 Chapter 3 Overview of Data Management

Creating Data Sources with a SAS Enterprise Guide Job

This demonstration illustrates how to build a SAS Enterprise Guide project to read and combine
data sources to create a new table for reporting and analysis.

This demonstration uses SAS Enterprise Guide to build the same process that you created in
SAS Data Integration Studio during the last demonstration.

1. Select Start All Programs SAS Enterprise Guide 4.3 to invoke SAS Enterprise Guide.
2. Select New Project from the Welcome window.
3. Change the connection profile.
The classroom machine is configured to use Jacques credentials by default. Because you want to use
Ellens credentials, you need to create a new connection profile.
a. Click Connection on the status bar in the lower right corner.
b. Click Add to create a new connection profile.
c. Type Ellens Profile in the Name field.
d. Verify that Remote is selected as the machine type and type the machine name provided by your
instructor.
e. Type Ellen in the User field and use the password provide by your instructor.
f. Click Save.
g. Click Set Active to activate the new profile.
h. Click Close to close the Connections window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.3 Creating Data Sources Using SAS Enterprise Guide 3-31

4. Add two existing source tables to the job.

a. Click in the window in the bottom left corner to display the SAS Folders.

b. Expand the Orion Star, Sales Department, and Data folders.


c. Drag CUSTOMER_DIM to the Process Flow window.
d. Close the data table window that opens by default.
e. Drag PRODUCT_DIM to the Process Flow window.
f. Close the data table window.
5. Add a new external file to the project.
a. Select File Import Data.
b. Navigate to My Computer S: Workshop sbaft43.
c. Select FT_Subset.csv.
d. Click Open.
The Import Data task appears.

e. Accept the default values for Step 1 and click Next to move to Step 2.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-32 Chapter 3 Overview of Data Management

f. Verify that the delimiter is set to Comma and that the File contains field names on record
number check box is selected and the record number is set to 1.

g. Click Next to move to Step 3.


h. Accept the default attributes and click Next to move to Step 4.
i. Accept the default options and click Finish.
j. Close the data table window.
6. Use the Query Builder to join the tables together.
a. Select Tasks Data Query Builder.
b. Click Join Tables.
c. Click Add Tables.
d. Select the CUSTOMER_DIM table.
e. Click Open.
f. Click Add Tables.
g. Select the PRODUCT_DIM table.
h. Click Open.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.3 Creating Data Sources Using SAS Enterprise Guide 3-33

i. Move the tables as needed to view the join lines and Venn diagrams.
The default join type is an inner join, which is what you want for this example.

j. Click Close to close the Tables and Joins window.


k. From each table, select the desired columns that you want to include in the table that will be
created from the query.
1) Click t1.(FT_SUBSET) and drag it to the Select Data tab to add all of the columns in that
table to the query.
2) Hold down the CTRL key and select the following columns from the CUSTOMER_DIM
table:
Customer_Country
Customer_Gender
Customer_Name
Customer_BirthDate
Customer_Age_Group
Customer_Age

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-34 Chapter 3 Overview of Data Management

3) Drag the selected columns to the Select Data tab.


4) Hold down the CTRL key and select the following columns from the PRODUCT_DIM
table:
Product_Line
Product_Category
Product_Group
Product_Name
Supplier_Country
Supplier_Name
5) Drag the selected columns to the Select Data tab.
l. Click Run to run the query and create the new table.
m. Use the scroll bars to view the columns and rows of data to ensure that the table was populated
correctly. There should be 2,590 rows of data and there will be missing values for the discount
column in most, but not all, of the rows
n. Close the data table window.
7. Export the new table.
a. Right-click the table named QUERY_FOR_FT_SUBSET and select Export
Export QUERY_FOR_FT_SUBSET.
b. Navigate to My Computer S: Workshop sbaft43.
c. Click Save.

To export the table to the local computer, SAS must be installed locally.

8. Save the SAS Enterprise Guide project.


a. Select File Save Project As.
b. Navigate to My Computer S: Workshop sbaft43.
c. Type FT Subset Project in the File name field.
d. Click Save.
9. Select File Exit to close SAS Enterprise Guide.
10. Click OK when you are prompted to close the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-35

3.4 Building an OLAP Cube

Objectives
Define OLAP terms.
Use the Cube Designer Wizard to build a cube from
a detail table.

43

What Is OLAP? (Review)


Online Analytical Processing, or OLAP, is an approach
to quickly answer analytical queries against
multidimensional data.
OLAP performs multidimensional analysis of business
data and provides the capability for complex calculations,
trend analysis, and sophisticated data modeling.
OLAP is part of the broader category of business
intelligence, which also encompasses relational reporting
and data mining.

44

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-36 Chapter 3 Overview of Data Management

OLAP and Data Warehousing


OLAP and data warehouses are complementary.
A data warehouse stores and manages data.

OLAP enables decision making about future actions


by analyzing the trend of the existing data.
OLAP transforms data warehouse data into strategic
information.

Reporting
Physical Data SAS OLAP
and
Warehouse Cubes
Analytics

45

Terminology and Definitions


Cube A logical set of data that is organized
and structured in a hierarchical,
multidimensional arrangement

A SAS cube consists of multiple files stored


in an operating systems file system.
A SAS cube includes measures and can have
numerous dimensions and levels of data.

46 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-37

Terminology and Definitions


Dimension An organized set of categories, known
as levels, that describes the data in a
source table

TIME GEOGRAPHY

PRODUCTS

47 continued...

Terminology and Definitions


Level One of the classification columns in a
dimension

Month Country City


Year
TIME GEOGRAPHY
Day
Quarter Continent

Group Line

PRODUCTS
Category

48 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-38 Chapter 3 Overview of Data Management

Terminology and Definitions


Hierarchy An arrangement of levels of a dimension
that provides the user a navigational
path through the data

Year Quarter Month


Year Month
TIME
Day Year Month Day
Quarter

Month Day

49 continued...

Terminology and Definitions


Measure A special dimension that usually
represents numeric values that are
analyzed
Measures

Average Total Sum of


Retail Sales Quantity

Sum of Total Average


Retail Sales Quantity

Average Sum of
Total Cost Total Cost

50 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-39

Terminology and Definitions


Aggregation A table that contains precalculated
Table summarizations
NWAY The aggregation table that has the
Aggregation minimum set of dimension levels that
is required for answering any business
question; the aggregation that has the
finest granularity

51

3.02 Multiple Choice Poll


Which of the following defines the NWAY aggregation?
a. A logical set of data that is organized and structured
in a hierarchical, multidimensional arrangement
b. The combination of all possible aggregations that
contains the answers to every query that can be
answered from the data
c. An organized set of categories that describes the
data in a source table
d. An arrangement of levels that provides the user with
a navigational path through the data

53

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-40 Chapter 3 Overview of Data Management

3.03 Multiple Choice Poll


Which of the following defines a cube?
a. A logical set of data that is organized and structured
in a hierarchical, multidimensional arrangement
b. The combination of all possible aggregations that
contains the answers to every query that can be
answered from the data
c. An organized set of categories that describes the
data in a source table
d. An arrangement of levels that provides the user with
a navigational path through the data

55

3.04 Multiple Choice Poll


Which of the following defines a dimension?
a. A logical set of data that is organized and structured
in a hierarchical, multidimensional arrangement
b. The combination of all possible aggregations that
contains the answers to every query that can be
answered from the data
c. An organized set of categories that describes the
data in a source table
d. An arrangement of levels that provides the user with
a navigational path through the data

57

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-41

Methods for Creating a SAS OLAP Cube


There are two methods for creating a SAS OLAP cube:
Write your own code using the OLAP procedure

Generate OLAP procedure code using the Cube


Designer Wizard

59

What Is the Cube Designer Wizard?


The Cube Designer Wizard
guides the user through the process of creating
and registering a cube
is a main feature of
SAS OLAP Cube Studio
is also available
in SAS Data Integration Studio.

60

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-42 Chapter 3 Overview of Data Management

Viewing a Cube
After you build a cube, you can examine the contents
of the cube with the View Cube function. The View Cube
function is
available from
the Actions
menu and
from the Cube
Context menu.

The View Cube function is available for use only with


61
physically built cubes.

What Is the OLAP Analyzer?


The OLAP Analyzer in SAS Enterprise Guide enables
you to view data that is stored in an OLAP cube.

62

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-43

Using the OLAP Analyzer Interface


The OLAP Analyzer consists of these elements:

63 ...

Using the OLAP Analyzer Interface


The OLAP Analyzer consists of these elements:
Toolbar

Table and
Cube
Graph Views
Manager

66

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-44 Chapter 3 Overview of Data Management

The Cube Manager


The Cube Manager includes five views that you can use
to manage the cube:
Data Enables you to select members for the cube
Dimensions views by using a tree view of the hierarchy for
each dimension.
Customized Enables you to add a percent of the visual total
Items and item to the table view, and create and edit
Sets calculated members, calculated measures, and
member sets.
Filters Enables you to create and edit filters for the
OLAP cube.

Conditional Enables you to create and edit conditional


Highlights highlights for the OLAP cube.

Bookmarks Enables you to create and edit bookmarks.


67

View SAS OLAP Cubes in Microsoft Excel


When you use the SAS
Add-In for Microsoft Office
4.3 in Microsoft Excel, two
OLAP viewers are available
for cubes:
PivotTable reports

SAS OLAP Viewer

68

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-45

What Is a PivotTable Report?


A PivotTable report is an interactive, cross-tabulated Excel
report that summarizes and analyzes data from various
sources, including those that are external to Excel.
With the SAS Add-In for Microsoft Office 4.3, you can use
SAS data sources or OLAP cubes to create a PivotTable
report.

69

What Is the SAS OLAP Viewer?


The SAS OLAP
Viewer enables
you to view and
interact with
data that is
stored in an
OLAP cube.

The SAS OLAP Viewer is equivalent to the


OLAP Analyzer found in SAS Enterprise Guide.
70

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-46 Chapter 3 Overview of Data Management

Building an OLAP Cube

This demonstration illustrates how use SAS OLAP Cube Studio to build an OLAP cube.
1. Select Start All Programs SAS SAS OLAP Cube Studio 4.2.
2. Log on with Ellens credentials.
a. Verify that the connection profile is My Server.

Do not select the Set this connection profile as the default check box.

b. Click OK to close the Connection Profile window and access the Log On window.
c. Type Ellen in the User ID field and use the password provided by your instructor.

Do not select the Save user ID and password in this profile check box.

d. Click OK to close the Log On window and log on.


3. Select File New Cube to begin building a new OLAP cube.
4. Specify the general properties.
a. Type FT US Customer Subset Cube in the Name field.
b. Click Select next to the Location field.
1) Select SAS Folders Orion Star Sales Department Data.
2) Click OK to close the Select a Location window.
c. Click Browse next to the Physical cube path field.
1) Select S: Workshop sbaft43.
2) Click OK to close the Browse window.
d. Verify that Detail table is selected as the value for the Input Type field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-47

The general properties should resemble the following:

e. Click Next.
5. Click Register Table to register a new table in metadata.
a. Select SAS.
b. Click Next.
c. Select FT Library in the SAS Library field.
d. Click Next.
e. Select QUERY_FOR_FT_SUBSET.
f. Click Next.
g. Click Finish.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-48 Chapter 3 Overview of Data Management

6. Select the input table.


a. Click to expand the FT Library.

b. Double-click QUERY_FOR_FT_SUBSET to move the table to the Selected table list box.
c. Click Next.
7. Select the drill-through table.
a. Click to expand the FT Library.

b. Double-click QUERY_FOR_FT_SUBSET to move the table to the Selected table list box.
c. Click Next.
8. Define the Time dimension.
a. Click Add.
b. Type Time in the Name field.
c. Type Time Dimension in the Caption field.
d. Select TIME as the value for the Type field.
e. Click Next.
f. Click next to the Add button and select Add supplied time hierarchies.

g. Select Order_Date as the value for the Input column field.


h. Click the check box for the YQMD supplied hierarchy.
i. Click the check box for the YW supplied hierarchy.
j. Click OK.
k. Accept the default level attributes and click Next.
l. Verify that YQMD is selected as the value for the Default hierarchy field.
m. Click Finish.
9. Define the Customer dimension.
a. Click Add.
b. Type Customer in the Name field.
c. Type Customer Dimension in the Caption field.
d. Verify that STANDARD is selected as the value for the Type field.
e. Click Next.
f. Click Add.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-49

g. Double-click the following columns to add them to the Input columns for new levels list:
Customer_Age_Group
Customer_Gender
Customer_ID
h. Click OK.
i. Click Next.
j. Click Add to add a hierarchy for the new Customer dimension.
1) Type AgegroupGender in the Name field.
2) Type Age Group, Gender Hierarchy in the Caption field.
3) Double-click Customer_Age_Group to move it to the Selected list box.
4) Double-click Customer_Gender to move it to the Selected list box.
5) Click OK.
k. Click Add to add a hierarchy for the new Customer dimension.
1) Type GenderAgegroupID in the Name field.
2) Type Gender, Age Group, ID Hierarchy in the Caption field.
3) Double-click Customer_Gender to move it to the Selected list box.
4) Double-click Customer_Age_Group to move it to the Selected list box.
5) Double-click Customer_ID to move it to the Selected list box.
6) Click OK.
l. Verify that AgegroupGender is selected as the value for the Default hierarchy field.
m. Click Finish.
10. Select the measures.
a. Click to expand CostPrice_Per_Unit.

b. Double-click Sum to add it to the Selected list box.


c. Double-click Average to add it to the Selected list box.
d. Click to expand Quantity.

e. Double-click Sum to add it to the Selected list box.


f. Double-click Average to add it to the Selected list box.
g. Click to expand Total_Retail_Price.

h. Double-click Sum to add it to the Selected list box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-50 Chapter 3 Overview of Data Management

i. Double-click Average to add it to the Selected list box.


j. Click Next.
k. Modify the measure details.
1) Type DOLLAR14. in the Format column for CostPrice_Per_UnitAVG.
2) Type DOLLAR14. in the Format column for CostPrice_Per_UnitSUM.
3) Type COMMA12. in the Format column for QuantityAVG.
4) Type COMMA12. in the Format column for QuantitySUM.
5) Type DOLLAR14. in the Format column for Total_Retail_PriceAVG.
6) Type DOLLAR14. in the Format column for Total_Retail_PriceSUM.
7) Verify that Total_Retail_PriceSUM is selected as the value for the Default measure field.

l. Click Next.
11. Add a member property.
a. Click Add.
b. Type Customer Name in the Name field.
c. Select Customer_ID as the value for the Level field.
d. Select Customer_Name as the value for the Column field.
e. Type Name in the Caption field.
f. Click OK.
g. Click Next.
12. Accept the default aggregations and click Next.
13. Verify that Save the metadata and create the cube is selected.
14. Click Finish.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-51

The cube is created and registered in the metadata and the SAS log is displayed.

15. Select File Exit to close SAS OLAP Cube Studio.


16. Use SAS Enterprise Guide to test the new cube.
a. Select Start All Programs SAS Enterprise Guide 4.3 to invoke SAS Enterprise Guide.
b. Select New Project from the Welcome window.
c. Verify that the Connection profile is using Ellens credentials.

d. Select File Open OLAP Cube.


e. Select SAS Folders in the selection list on the left side of the window.
f. Navigate to Orion Star Sales Department Data.
g. Select FT US Customer Subset Cube.
h. Click Open.
The cube opens in the OLAP Analyzer.

i. Select View Maximize Workspace.


j. Click to expand 15-30 years.
k. Click to expand 61-75 years.
l. Click to drill down on 2003.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-52 Chapter 3 Overview of Data Management

The updated view is displayed.

m. Click Tile Views on the toolbar.


You can now see both a table and chart view of the data.

n. Click Tab Views to return to a single view of the data.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.4 Building an OLAP Cube 3-53

o. Right-click Customer Age Group and select Replace With Customer Dimension
Gender, Age Group, ID Hierarchy All GenderAgegroupID Hierarchy.
1) Click to expand All GenderAgegroupID.

2) Click to expand Female.

3) Click to drill down on 46-60 years.

p. Right-click Customer_ID and select Show Member Property.


q. Click the Name check box.
r. Click OK.
The table view is updated to display the customer name in addition to the customer ID.

s. Right-click $152 for customer 2433 in the second quarter and select Drill Through Details.

t. Close the details window.


u. Select View Maximize Workspace.
v. Select File Exit to close SAS Enterprise Guide.
w. Select No when you are prompted to save the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-54 Chapter 3 Overview of Data Management

3.5 Solutions to Student Activities (Polls/Quizzes)

3.01 Quiz Correct Answer


Do you need to learn SAS programming code to
successfully use SAS Enterprise Guide?
Yes
No

You do not need to learn SAS programming to


effectively use SAS Enterprise Guide. However,
if you are a SAS programmer, you can use SAS
Enterprise Guide to write new programs or to
customize the code produced by tasks and wizards.

37

3.02 Multiple Choice Poll Correct Answer


Which of the following defines the NWAY aggregation?
a. A logical set of data that is organized and structured
in a hierarchical, multidimensional arrangement
b. The combination of all possible aggregations that
contains the answers to every query that can be
answered from the data
c. An organized set of categories that describes the
data in a source table
d. An arrangement of levels that provides the user with
a navigational path through the data

54

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3.5 Solutions to Student Activities (Polls/Quizzes) 3-55

3.03 Multiple Choice Poll Correct Answer


Which of the following defines a cube?
a. A logical set of data that is organized and structured
in a hierarchical, multidimensional arrangement
b. The combination of all possible aggregations that
contains the answers to every query that can be
answered from the data
c. An organized set of categories that describes the
data in a source table
d. An arrangement of levels that provides the user with
a navigational path through the data

56

3.04 Multiple Choice Poll Correct Answer


Which of the following defines a dimension?
a. A logical set of data that is organized and structured
in a hierarchical, multidimensional arrangement
b. The combination of all possible aggregations that
contains the answers to every query that can be
answered from the data
c. An organized set of categories that describes the
data in a source table
d. An arrangement of levels that provides the user with
a navigational path through the data

58

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3-56 Chapter 3 Overview of Data Management

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 4 Creating Information
Maps

4.1 Understanding SAS Information Maps ......................................................................... 4-3

4.2 Using Different Data Sources ...................................................................................... 4-12


Demonstration: Creating a New Information Map................................................................ 4-25

Exercises .............................................................................................................................. 4-32

4.3 Exploiting Dynamic Subsetting of Data...................................................................... 4-34


Demonstration: Creating Simple Filters ............................................................................... 4-42

Demonstration: Creating Compound Filters ........................................................................ 4-49

Exercises .............................................................................................................................. 4-52

Demonstration: Creating Prompted Filters .......................................................................... 4-57

Exercises .............................................................................................................................. 4-63

4.4 Creating Prefilters to Subset the Information Map Data ........................................... 4-65
Demonstration: Using Prefilters ........................................................................................... 4-75

4.5 Building an Information Map from a SAS OLAP Cube .............................................. 4-84
Demonstration: Creating an Information Map Using an OLAP Cube .................................. 4-88

4.6 Solutions ....................................................................................................................... 4-92


Solutions to Exercises .......................................................................................................... 4-92

Solutions to Student Activities (Polls/Quizzes) ................................................................... 4-104

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-2 Chapter 4 Creating Information Maps

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.1 Understanding SAS Information Maps 4-3

4.1 Understanding SAS Information Maps

Objectives
Describe where SAS Information Maps fit into the
SAS platform.
Discuss the difference between direct access to an
information map versus using the SAS Information
Maps LIBNAME Engine.
List the common uses of SAS Information Maps.
Describe the SAS Information Map Studio interface,
including these components:
Resources pane
Design tab
Relationships tab
Properties pane
Data Item Properties window
3

What Is a SAS Information Map? (Review)


SAS Information Maps are metadata definitions of
enterprise data. They provide a basis for querying and
reporting.

SAS SAS SAS


SAS Information
Map Studio
DBMS DBMS

Data Warehouse

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-4 Chapter 4 Creating Information Maps

Where Do SAS Information Maps Fit In?


SAS Information Maps enable business users to access
data in an easily understood format.
Physical Business Reporting
Data Warehouse Metadata and Analytics

SAS Data SAS Information SAS Add-In for


Integration Studio Map Studio Microsoft Office
SAS Enterprise Guide
Builds Reads Builds
information SAS Web Report Studio
warehouse warehouse
metadata metadata maps SAS Information
Delivery Portal
SAS BI Dashboard

Metadata Reads
Builds reports
and performs
information
analysis
maps
5

SAS Data Integration Studio builds the data in the data warehouse, in data marts, or in both. The metadata
relating to these activities is recorded in a metadata repository on the metadata server.
SAS Information Map Studio reads the metadata about the data in the data warehouse or data marts and
translates this information into information maps. The information maps are, in turn, recorded in a
metadata repository on the metadata server.
The SAS Add-In for Microsoft Office, SAS Enterprise Guide, SAS Web Report Studio, the SAS
Information Delivery Portal, and SAS BI Dashboard read the information map metadata to provide a
business user view of the data for reporting and analysis.
The SAS Metadata Server manages the metadata and provides security.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.1 Understanding SAS Information Maps 4-5

Where Are Information Maps Used?


SAS Information Maps can be accessed directly by many
of the SAS platform applications. Other SAS applications,
as well as SAS program code, can access the data from
an information map using the SAS Information Maps
LIBNAME Engine.
SAS BI SAS Web
Dashboard Report Studio
Other SAS SAS Information
Products Delivery Portal
SAS Information SAS Add-In for
Enterprise Guide Map Microsoft Office

SAS Code SAS Information Other SAS Products


Maps LIBNAME
Engine
6

From an interface standpoint, SAS Enterprise Guide and the SAS Add-In for Microsoft Office
provide direct access to information maps. Behind the scenes, they use the SAS Information
Maps LIBNAME Engine.

Information maps based on multidimensional data cannot be opened in the SAS add-in or
in SAS Enterprise Guide. They also cannot be used in SAS code.

Common Uses of SAS Information Maps


Information maps can be used by many of the
SAS platform applications, including the following:
The SAS Add-In for Microsoft Office and
SAS Enterprise Guide enable you to use information
maps to view the underlying data and use that data
to build reports and analyses.
Information maps provide a data source for building
reports in SAS Web Report Studio.
In the SAS Information Delivery Portal, information
maps enable you to interact with the underlying data.
Information maps can provide a data source for a
SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-6 Chapter 4 Creating Information Maps

4.01 Poll
The interface for adding an information map in the
SAS Add-In for Microsoft Office and SAS Enterprise
Guide enables you to select the information map
much as you would select any other data source.
True
False

What Is SAS Information Map Studio?


SAS Information Map Studio is a point-and-click
application used to create, modify, and test information
maps.

11

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.1 Understanding SAS Information Maps 4-7

SAS Information Map Studio Interface


In addition to the menu and toolbar, SAS Information
Map Studio has several interface elements, including
the following:
Resources Provides access to existing information
pane maps as well as the resources needed
for creating new information maps.
Design tab Displays the information map that is
currently open and its resources.
Relationships Is used to define the join criteria
tab between multiple relational tables.
Properties Displays the properties for the selected
pane item.
12

Resources Pane: Information Map Folders


The Information Map Folders
tab enables you to manage
your information maps.

The only content items


displayed on the Information
Map Folders tab are
information maps and folders.

13

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-8 Chapter 4 Creating Information Maps

Resources Pane: Application Servers


The Application Servers tab
enables you to select the type
of data source to use for the
information map.

After selecting a table, you can


also add a stored process as a
dynamic data source.

14

4.02 Quiz
What is the difference between what is displayed on
the Information Map Folders tab and the Application
Servers tab?

16

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.1 Understanding SAS Information Maps 4-9

Relationships Tab
The Relationships tab specifies how data sources are
joined in a query.
You can create
one simple
relationship by
specifying two
table columns
one compound
relationship by
specifying
multiple pairs
of columns.

18

Properties Pane
The Properties pane enables you to view all of the
properties of a selected item. Some properties can be
edited directly using this pane.
In addition, you can use the Properties
pane to simultaneously view or update
properties from multiple data items.
When you select a property in the
Properties pane, the Property
Description area displays information
about the selected property.

19

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-10 Chapter 4 Creating Information Maps

Information Map Data Items


An information map is
made up of data items.
Each data item has
metadata to specify its
properties, which are
grouped into the
following categories:
Definition

Classifications,
Aggregations,
Formats
Value-Generation
Method
Actions
20

Information Maps: Filters


A filter is an information map item that contains criteria
to subset the data.
Creating filters in an information
map enables additional
subsetting capabilities when
you use the information map.
The prompting framework
enables you to add interactive
capabilities to the filters.

21

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.1 Understanding SAS Information Maps 4-11

Information Maps: Folders


Depending on your data sources, you might
find that you have many data items and filters in your
information map.
You can use folders to organize the data items and filters
in a way that makes it easier to find information.

22

4.03 Quiz
Match each item with the correct description.
Items:
1. Data Item
2. Filter
3. Folder
Descriptions:
A. Contains instructions for subsetting the values
B. Metadata about a physical column or expressions to
calculate values
C. Used to organize the information map

24

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-12 Chapter 4 Creating Information Maps

4.2 Using Different Data Sources

Objectives
List the steps to create an information map.
Discuss the types of data sources that can be used to
create an information map.
Describe the types of query languages that are used
to retrieve the data values from each type of data
source.

27

Steps to Create an Information Map


The typical steps for creating an information map using
SAS Information Map Studio are the following:
1. Select a data source.
2. Create data items.
3. Create optional items:
Filters
Folders
Additional data sources
4. Save the information map.
5. Test the information map.

28

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-13

Step 1: Select a Data Source


To create a new information map, you must use the
Application Servers tab in the Resources pane to add
data sources.
Valid data sources are
one or more relational tables

a single OLAP cube

a stored process.

29

Resources Pane: Application Servers (Review)


The Application Servers tab
enables you to select the type
of data source to use for the
information map.

After selecting a table, you


can also add a stored process
as a dynamic data source.

30

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-14 Chapter 4 Creating Information Maps

4.04 Multiple Choice Poll


When can you add a stored process as a data source?
a. Anytime
b. After you added a table
c. After you added an OLAP cube

32

Step 2: Creating Data Items


After you added data sources, you can create data items
in the information map.
A data item is a logical view of a physical data field or
a calculation. Each data item consists of metadata to
specify its properties.
There are two types of data items:
Category
Measure

34

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-15

Data Items: Category


A category is a data item whose distinct values are used
to group and aggregate measures.
Here are examples of category data items:
Last name
Gender

Country

Year

Product ID

35

There are actually four types of category data items: alphanumeric, date, time, and timestamp. The
underlying type of the category data item can be important when you perform tasks such as filtering,
sorting, and formatting.

Data Items: Measure


A measure is a data item whose values can be used in
computations.
Here are examples of measure data items:
Item cost
Age

Quantity ordered

Dollar amount of an order

A computation based on a measure, often referred to as


an aggregation or a summarization, is calculated using
the distinct values of one or more categorical columns.

36

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-16 Chapter 4 Creating Information Maps

Data Item Default Classifications


A new data item is created for each selection that you
made from the data source.
The following table shows the default classification
for each type of data item:
Data Type Default Classification
Character Category
Date, Time, Datetime Category
Numeric primary or foreign key Category
Numeric Measure

37

Information Maps: New Data Items


A new data item is a metadata instruction for how to
calculate the data value. When you create a new data
item, you create an expression that is executed
dynamically each time that the information map is
accessed.

38 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-17

Information Maps: New Data Items


New data items can
be created using the
Expression Editor.
The Expression Editor
enables you to build
simple calculations
as well as use SAS
functions to build
advanced calculations.

39

4.05 Quiz
Identify the default data item classification for each
physical column listed below:
Employee Name
Employee ID
Salary
Hire Date

41

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-18 Chapter 4 Creating Information Maps

Data Item Property: Classification


A data item classification can be either category or
measure. For the measure classification, the user can
choose from several functions. There is also a default
function.

43

Data Item Property: Value-Generation Method


Selecting User enters values specifies that the creator of
the filter enters values in the Filter Definition dialog box.
This method is useful when you do not want the values of
the data item to be freely displayed or there is a large
number of values. This method is the default setting.

44 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-19

Data Item Property: Value-Generation Method


Selecting User selects values from a dynamic list
specifies that the Filter Definition dialog box should query
the data source to dynamically generate a list of unique
data item values. This method is useful when the data
item has a limited number of potential values and the
values are unpredictable or change often.

45 continued...

Data Item Property: Value-Generation Method


Selecting User selects values from a static list
specifies that the Filter Definition dialog box should use
the static list of values that you create on this tab. This
method is useful when your list of values is well known,
very short, or when you want to enable access to only a
subset of the data item values.

46

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-20 Chapter 4 Creating Information Maps

Data Item Property: Default Query


Selecting the Include in the default query check box
specifies that a data item is automatically used in SAS
Web Report Studio when you open an information map
directly.

47

This property is new to SAS Information Map Studio 4.2, maintenance release 2 and later.

Step 3: Create Optional Items


Information maps that contain filters enable the user
to subset the data with predefined expressions.
The prompting framework enables dynamic selections.
There are two types of filters:

General A general filter is based on one or more


Filter criteria and typically returns the same
value each time it is used.
Prompted A prompted filter asks the user to specify
Filter one or more values that determine how
to subset the data for the current
process.

48 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-21

Step 3: Create Optional Items


Folders can be added to an information map to organize
the data items and filters.
Organizing data items into folders can help both the
information map developer and the information map user
to easily find what they are looking for.

49

Step 4: Save the Information Map


Information maps are stored in metadata using the
SAS Folders structure.
There are many ways to organize the SAS Folders, such
as the following:
By project

By workgroup

For a specific time period

For a specific geographical area

50

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-22 Chapter 4 Creating Information Maps

Step 5: Test the Information Map


After you create an information map, it is important to test
it.
SAS Information
Map Studio
includes a testing
facility, which
enables you to
test an information
map while you are
creating it.

51

Creating and Using an Information Map


The example below documents the creation and use of an
information map based on a single relational table.
1. The ORG_DIM table
is specified as the
data source.
2. Information map
data items and SAS
filters are created. Client
3. An SQL query is Application

created based on
user selections.
4. The results are
displayed in the
SAS client application.
52

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-23

Where Does the Data Come From?


When a SAS Information Map is used, a query is created
and run against physical data sources. Each data source
uses a different language for querying the data.

Information
SQL MDX
Map

SAS and 3rd OLAP Cubes


Party Tables

SAS Code

Stored
Process

55

SQL Structured Query Language is a standardized language that is used to create and
manipulate objects in a database management system. SAS implements SQL through the
SQL procedure.

MDX Multidimensional expressions language is a standardized language that is used for


querying multidimensional data sources. The MDX language is the multidimensional
equivalent of SQL.

SAS A SAS stored process provides a dynamic data source using SAS program code to
Code access and create the data

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-24 Chapter 4 Creating Information Maps

Information Map Data Sources


Information maps can be created from one or more
relational tables, a single OLAP cube, or a dynamic
data source using a stored process.
When you create an information map from multiple
relational tables, relationships must be established
to specify how the tables are joined together.

56

Relationships Tab (Review)


The Relationships tab specifies how data sources are
joined in a query.
You can create
one simple
relationship by
specifying two
table columns
one compound
relationship by
specifying
multiple pairs
of columns.

57

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-25

Creating a New Information Map

This demonstration illustrates how to create and modify an information map from a single relational data
source.
1. Select Start All Programs SAS SAS Information Map Studio 4.2.
2. Log on with Erics credentials.
a. Verify that the connection profile is My Server and click OK.
b. Type Eric in the User ID field and type the password provided by the instructor.
c. Click OK.
3. If necessary, click OK to close the Create an Information Map window.

Adding a Data Source and Creating Data Items

1. If necessary, click to show the Resources pane.

2. Click (the Application Servers tab) in the Resources pane.

3. Click to expand Orion Star Library.

4. Double-click the Orion Star Products table to add it to the Selected Resources list box of the
Design tab (or right-click the table name and select Insert Table).

5. Click to hide the Resources pane.

6. Expand Orion Star Library.


7. Expand the Orion Star Products table to display the physical column names.

8. Click to create data items for all of the physical columns in the Orion Star Products table.

By default, when you create data items from all columns in a table, a new folder is created
with the name of the table. You can disable this option by selecting Tools Options Data
Items. Then clear the When creating data items from all courses in a table, automatically
create a new folder for them check box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-26 Chapter 4 Creating Information Maps

9. Expand the Orion Star Products folder in the Information Map Contents list box to show the data
items.

Testing the Information Map

1. Select Tools Run a Test Query (or select on the toolbar).

2. Select the following data items by double-clicking them or by selecting them and using the arrow
buttons:
Product Category
Product Group
Product Line
Supplier Id
3. Accept the default output options and click Run Test.

The default output options display the aggregated values grouped by category. In this example,
the Product Line values are grouped within Product Group, which is grouped within
Product Category. Because Supplier Id is a measure, the values for all of the occurrences of
Supplier Id within the groups are summed together.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-27

4. Click View SQL to view the SQL query code that was run for the test.

Because Supplier_ID is numeric in the original data, it becomes a measure by default in the
information map. The default for all measures is to use the SUM function. This is not the
desired behavior for Supplier_ID.
5. Click Close to close the View Query window.
6. Click Close to close the Results window.
7. Click Close to close the Test the Information Map window.

Changing Data Item Properties

Change the classification of Supplier Id from measure to category to prevent the supplier IDs from being
summed.
1. Double-click the Supplier Id data item in the Information Map Contents list box (or right-click the
data item and select Properties). The Data Item Properties window appears.
2. Select Classifications, Aggregations, Formats from the selection pane on the left side of the
window.
3. Click Category to change the classification from measure to category.

When you change the classification to category, the selections for aggregate functions
become inactive.
4. Click OK to save the changes and close the Data Item Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-28 Chapter 4 Creating Information Maps

Changing Properties for Multiple Data Items

Several data items are used for filtering the query. You can set properties, such as the value-generation
method, for multiple data items at the same time.
1. Select Product Category in the Information Map Contents list box.
2. Hold down the CTRL key and click the following data items:
Product Group
Product Line
Supplier Country
Supplier Name
In the Properties pane, the common values are displayed next to each property. All of the selected data
items have the same value for the value-generation method.

Properties with missing values typically indicate that the selected data items have different
values.
3. Click the black triangle ( ) in the value cell for the Value-generation method property.
The Data Item Properties window appears with the Value-Generation Method section displayed.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-29

4. Click the User selects values from a dynamic list radio button.

Because all of the selected data items might change over time, a dynamic list provides the current
values and does not require the information map to be edited each time that the values change.

The Selected Data Items list box shows that there are five data items for which you are
viewing the properties.

The User selects values from a static list choice is not enabled when multiple data items are
selected.
5. Click OK to save the changes and close the Data Item Properties window.
6. Select Tools Run a Test Query.

Because you recently ran a test query, the previous selections are remembered.

7. Click Run Test.

Because Supplier Id is now a category, each distinct Supplier Id value is listed.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-30 Chapter 4 Creating Information Maps

8. Click View SQL to view the SQL query code that was run for the test.
9. Verify that the SUM function no longer appears in the code.

10. Click Close to close the View Query window.


11. Click Close to close the Results window.
12. Click Close to close the Test the Information Map window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-31

Specifying a Default Data Item for Reports

SAS Information Maps are most often used for SAS Web Report Studio reports. You can designate a data
item as one to be used by default in a SAS Web Report Studio report.
1. Select Product Category in the Information Map Contents list box.
2. Hold down the CTRL key and click the following data items:
Product Group
Product Line
3. Click the black triangle ( ) in the value cell for the Default query property.
4. Change the value to Yes.

The Default query property is applicable only for reports created with SAS Web Report
Studio and not when testing the information map.

Saving the Information Map

1. Select File Save As.


2. Navigate to Orion Star Marketing Department Information Maps.
3. Type FT All Products in the Name field.

Although information map names can be up to 60 characters, it is a best practice to limit the
name to 32 bytes. The number of characters that 32 bytes represents depends on the encoding
that SAS uses to process your data.
The SAS Information Maps LIBNAME Engine that is used by the SAS Add-In for Microsoft
Office and SAS Enterprise Guide can process only information maps with names that are 32
bytes or less.
4. Click Save.
5. Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-32 Chapter 4 Creating Information Maps

Exercises

1. Creating a New Information Map from Relational Data


a. Open SAS Information Map Studio using the default connection profile and Ellens credentials.

You use Ellens credentials for all of the exercises in this chapter.

b. Create a new information map from the FT US Customer Subset table in FT Library.
Create data items for all of the physical columns except the following:
Customer_BirthDate
Customer_ID
Delivery_Date
Employee_ID
Order_ID
Product_ID
Street_ID
Change the value-generation method for the following columns to User selects values from
a dynamic list:
Customer Age Group
Customer Country
Product Category
Product Group
Product Line
Supplier Country
Supplier Name
Change the value-generation method for the following columns to User selects values from
a static list and build the list by querying the data:
Customer Gender
Order Type
Set the format for Costprice Per Unit and Total Retail Price to the DOLLAR14. format.
Set the format for Quantity to the COMMA12. format.
Set the following columns as default columns for SAS Web Report Studio:
Costprice Per Unit
Customer Gender
Order Type
Quantity
Total Retail Price

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.2 Using Different Data Sources 4-33

Test the information map using Customer Gender, Order Type, Quantity, and Total Retail
Price.

c. Save the new information map as FT US Customer Subset in Orion Star Sales
Department Information Maps and close SAS Information Map Studio.
2. Creating a Report in SAS Web Report Studio Using the New Information Map
a. Log on to SAS Web Report Studio with Ellens credentials.
b. Directly open the FT US Customer Subset information map that you saved.

c. Why was the report created with these five data items?
Answer:
d. Log off and close the browser window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-34 Chapter 4 Creating Information Maps

4.3 Exploiting Dynamic Subsetting of Data

Objectives
Define the types of filters that are available for
subsetting data in an information map.
List the different methods for creating a new filter
in SAS Information Map Studio.
Describe the ways that data items can be used
in a filter.
List the possible filter conditions.
List the different filter values that can be used.
Describe the options that might be available
when you create a filter.
List the steps to create a compound filter.
Describe the functionality provided by the filter
combination section of the New Filter window.
62

Information Maps: Filters (Review)


A filter is an information map item that contains
an expression for subsetting the data.
The SAS Prompting Framework
enables you to add interactive
capabilities to filters.

63

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-35

Subsetting Data in an Information Map


When an information map is used for reporting and
analysis, filters provide the user with an easy way to
select from predetermined criteria for subsetting the
underlying data source.
There are several types of filters, including the following:
Simple filters

Compound filters

Identity-driven filters

Prefilters
Prompted filters

64

Simple and Compound Filters


When you create a
simple filter, you
specify a single
condition for
subsetting the data.

When you create a


compound filter, you
specify multiple
conditions for
subsetting the data.

65

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-36 Chapter 4 Creating Information Maps

4.06 Quiz
What is the difference between a simple filter and
a compound filter?

67

Identity-Driven Filters
When creating an identity-driven filter, you specify an
identity-specific value that is retrieved from the metadata
and compared to the values
in your target data.
Identity-specific properties
include the following:
SAS.PersonName

SAS.IdentityGroupName

SAS.IdentityName

SAS.Userid

SAS.IdentityGroups

SAS.ExternalIdentity

69

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-37

Prefilters
A prefilter is a mechanism to subset relational data before
it becomes available to the user of the information map.
A prefilter can subset data based on simple, compound,
or identity-based criteria.
There are two types of prefilters:
General prefilters

Authorization-based prefilters

70

Prompted Filters
A prompted filter enables the user to make selections
that are incorporated into the information map query.
Using a prompted filter in an information map provides
for dynamic subsetting of the underlying information.

71

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-38 Chapter 4 Creating Information Maps

Creating Filters
There are several ways to create a new filter in
SAS Information Map Studio, including the following:
Select Insert New Filter from the menu bar.

Select New Filter from the context menu when you


right-click on the information map name in the
Information Map Contents list box.
Click on the toolbar.

72

New Filter Window


The New Filter window enables you to create filters by
providing the following information:
Filter name

Description (optional)

Criteria for subsetting


the data source
Data item
Condition
Value or values

73

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-39

Selecting Data Items for Filters


When you select data items for a filter, you can select
an item from the list or click Edit Data Item and use
the Edit Expression window to modify the default value.

74 continued...

Selecting Data Items for Filters


Example: The data contains the annual salary, but you
want to create a filter on the monthly salary.
Select Annual Salary and then
click Edit Data Item and create
an expression to divide the
salary value by 12 before you
compare it to the filter value.

75

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-40 Chapter 4 Creating Information Maps

Filter Conditions
The conditions that you can use when you create a filter
depend on the data item type.
Valid conditions include the following:
Is equal to / Is not equal to

Is less than / Is greater than

Is less than or equal to / Is greater than or equal to

Is between / Is not between


Is missing / Is not missing

Contains

Like

Relative time filter

76

There are two wildcards that you can use with the LIKE condition:

_ (underscore) Use this wildcard in place of a single character.

% (percent) Use this wildcard in place of zero or more characters.

4.07 Quiz
What is the result of using each example below with
a filter that contains a LIKE condition?
'te_t'

'test%'

78

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-41

Filter Values
The values that you can use when you create a filter
depend on the data item type and other properties such
as the value-generation method.
Valid values include the following:
Enter value(s)

Prompt user for value(s)

Select value(s) from a list

Use an expression
Derive identity values (for row-level permissions)

80

Filter Options
Depending on the data source type, two options might
be available when you create filters.
Clicking this button accesses the Filter
combinations section of the New Filter
window, which enables you to create a
compound filter.
This option is not valid when you use an
OLAP data source.
Hide from When this option is selected, the filter is
user hidden from the user of the information map.
When this option is selected, the filter
is not available in the testing facility
in SAS Information Map Studio.
81

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-42 Chapter 4 Creating Information Maps

Creating Simple Filters

This demonstration illustrates how to use SAS Information Map Studio to create a simple filter.
1. Select Start All Programs SAS SAS Information Map Studio 4.2.
2. Log on. Use Erics credentials.
a. Accept the default connection profile and click OK.
b. Type Eric in the User ID field and type the password provided by the instructor.
c. Click OK to close the Log On window.
d. If necessary, click OK to close the Create an Information Map window.
3. Open the Orion Star Employees information map.

a. If necessary, click to show the Resources pane.

b. Click (the Information Map Folders tab) in the Resources pane.

c. Double-click the following folders to open them: Orion Star Marketing Department
Information Maps.
d. Double-click Orion Star Employees to load it on the Design tab.

e. Click to hide the Resources pane.

4. Create a new simple filter.


a. Select Insert New Filter.
b. Type Marketing Employees in the Filter Name field.
c. Select Department as the value for the Data item field.
d. Verify that Is equal to is selected as the value for the Condition field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-43

e. Select Select value(s) from a list as the value for the Value(s) field.
f. Double-click Marketing to copy it to the Selected list box.

g. Click OK to close the New Filter window.


5. Test the new filter.
a. Select Tools Run a Test Query.
b. Double-click the following items to copy them to the Selected items list box:
Employee Name
Department
Annual Salary
Marketing Employees (filter)

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-44 Chapter 4 Creating Information Maps

c. Click Run Test.

d. Click View SQL to view the query.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-45

e. Click Close to close the View Query window.


f. Click Close to close the Results window.
g. Click Close to close the Test the Information Map window.
6. Save the information map with a new name.
a. Select File Save As.
b. If necessary, navigate to Orion Star Marketing Department Information Maps.
c. Type FT Employees in the Name field.
d. Click Save.

Do not close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-46 Chapter 4 Creating Information Maps

Creating Compound Filters


Compound filters are filters that contain multiple rules
for subsetting the data.
The steps to create a compound filter are as follows:
1. Create a new filter and specify the first rule.
2. Click Combinations to access the Filter combinations
section of the New Filter window.
3. Click Add to add the first rule.
4. Specify the second rule and click Add.
5. Enter all of the additional rules.
6. If necessary, change the value that is used to join the
criteria.
7. Click OK to save the new compound filter.

84

Discussion

What are some examples of when you would


use a compound filter instead of a simple filter?

85

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-47

Filter Combinations
Clicking the Combinations button accesses the Filter
combinations section of the New Filter window.

As rules are added to the Filter combinations table, the


various buttons and options become enabled.

86

Filter Combination Functionality


Filter combination actions include the following:

Add Adds the rule as a new row to the bottom of the


Filter combinations table.
Update Updates the Filter combinations table with
changes to the selected rule. This button is
available when an existing rule is edited.
Edit Moves the rule from the Filter combinations
table to the Data item, Condition, and
Values(s) fields so that it can be edited.
Delete Deletes the selected rule from the Filter
combinations table.

87 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-48 Chapter 4 Creating Information Maps

Filter Combination Functionality


And Inserts the AND operator, which is used to join
that row and the next row, in the selected row.
Or Inserts the OR operator, which is used to join
that row and the next row, in the selected row.
Not Inserts the NOT operator at the beginning of
the selected row.
Group Groups the rows together by adding an open
parenthesis before the rule in the first row and
a close parenthesis after the rule in the last
row. Available when multiple rows are selected.
Split Splits the outermost group that contains the
selected rule.
88

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-49

Creating Compound Filters

This demonstration illustrates how to use SAS Information Map Studio to create compound filters.

This demonstration assumes that you are logged on to SAS Information Map Studio as Eric and
have the FT Employees information map open.
1. Create a new compound filter.
a. Select Insert New Filter.
b. Type Marketing Employees over $50,000 in the Filter name field.
c. Select Department as the value for the Data item field.
d. Verify that Is equal to is selected as the value for the Condition field.
e. Select Select value(s) from a list as the value for the Value(s) field.
f. Double-click Marketing to copy it to the Selected list box.
g. Click Combinations.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-50 Chapter 4 Creating Information Maps

h. Click Add.
The first rule is added to the Filter combinations table, and the fields at the top of the window are
cleared.
i. Select Annual Salary as the value for the Data item field.
j. Select Is greater than as the value for the Condition field.
k. Verify that Enter value(s) is selected as the value for the Value(s) field.
l. Type 50000 in the box under the Value(s) field.

Special characters such as dollar signs and commas are not valid in this field.

m. Click Add.
The Filter combinations table should resemble the following:

It is important to make sure that you add the final rule to the Filter combinations table
before you close the New Filter window.
n. Click OK to close the New Filter window.
2. Test the new filter.
a. Select Tools Run a Test Query.
b. Double-click the following items to copy them to the Selected items list box:
Employee Name
Department
Annual Salary
Marketing Employees over $50,000 (filter)

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-51

c. Click Run Test.

d. Click Close to close the Results window.


e. Click Close to close the Test the Information Map window.
f. Select File Save to save the information map with the same name.
3. Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-52 Chapter 4 Creating Information Maps

Exercises

3. Creating a Compound Filter


a. Open SAS Information Map Studio. Use the default connection profile and Ellens credentials.
b. Create a new information map from the FT US Customer Subset table in FT Library.
Create data items from the following physical columns:
Order_Type
Product_Group
Quantity
Supplier_Name
Total_Retail_Price
Change the value-generation method for Product Group and Supplier Name to User selects
values from a dynamic list.
Change the value-generation method for Order Type to User selects values from a static
list and run a query to select the values.
Associate the format of DOLLAR14. to Total Retail Price.
Associate the format of COMMA12. to Quantity.
Create a new compound filter to select retail shoe sales. The Product Group values contain
Shoes. The unformatted value for Order Type that corresponds to Retail Sale is 1.

Hint: Type "Shoes" in the box under the Value(s) field. (The quotation marks and case are
important.)
Test the new information map.

c. Save the new information map as FT US Customer Subset Product Analysis in Orion Star
Sales Department Information Maps and close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-53

4. Using the New Information Map as a Data Source in SAS Enterprise Guide
a. Open SAS Enterprise Guide and create a new project. Use Ellens credentials.
b. Open the FT US Customer Subset Product Analysis information map.
Hint: Select File Open Information Map.
Select all of the data items.
Select the Retail Shoe Sales filter.

c. Save the project as FT Retail Shoe Sales in S:\Workshop\sbaft43 and close SAS Enterprise
Guide.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-54 Chapter 4 Creating Information Maps

Creating Filters with Prompts


In SAS Information Map Studio, you create and use
prompts as you build a filter.
After entering the general information for the filter, select
Prompt user for value(s) and then select an existing
prompt, create a new prompt, or add a shared prompt.

92

New Prompt: General Tab


The General tab of the New Prompt window enables you
to specify the following:
name

displayed text

description

options

Because prompts are associated with filters


in SAS Information Map Studio, they always
require a non-blank value.
93

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-55

New Prompt: Prompt Type and Values Tab


The Prompt Type and Values tab enables you to specify
the attributes for the prompt. The prompt type is
determined by the type of data item that is used in the filter.

The available attributes are based on the prompt type.


94

Cascading Prompts
Cascading prompts populate prompt values based on
selections in other prompts.
Example: When a department is selected, the list of
sections is dynamically generated based
on the selected department. Group values
are also dynamically generated based on
the selected section.

95

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-56 Chapter 4 Creating Information Maps

Establishing Dependencies between Prompts


Consider the following guidelines when you establish
dependencies between prompts:
You cannot establish dependencies for shared
prompts.
The first prompt can use any method
to obtain values. All other prompts
must have User selects values
from a dynamic list as the value
for the Method for populating prompt field.
Information maps with dependencies between
dynamic prompts can use only information maps as
the data source.

96 continued...

Establishing Dependencies between Prompts


The order in which the
prompts are listed in the
Filter combinations table
is the order that will be
used for the dependency.
Click the Establish
dependencies between
prompts check box to
create dependencies
between the prompts.

97

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-57

Creating Prompted Filters

This demonstration illustrates how to build prompted filters.


1. Select Start All Programs SAS SAS Information Map Studio 4.2.
2. Log on. Use Erics credentials.
a. Accept the default connection profile and click OK.
b. Type Eric in the User ID field and type the password provided by the instructor.
c. Click OK to close the Log On window.
d. If necessary, click OK to close the Create an Information Map window.
3. Open the Orion Star Employees Prompting information map.

a. If necessary, click to show the Resources pane.

b. Click (the Information Map Folders tab) in the Resources pane.

c. Double-click the following folders to open them: Orion Star Marketing Department
Information Maps.
d. Double-click Orion Star Employees Prompting to load it on the Design tab.
e. Click to hide the Resources pane

This information map contains four prompted filters:

4. Test the information map and existing filters.


a. Select Tools Run a Test Query.
b. Double-click the following items to copy them to the Selected items list box:
Employee Name
Employee Country
Annual Salary
Select Salary Range (filter)
c. Click Run Test.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-58 Chapter 4 Creating Information Maps

The Prompt window appears. Using one prompt, you are prompted for a range of values. The
prompt values are required and default values are provided.

e. Type 10,000 in the From field.


f. Type 25,000 in the To field.
g. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-59

h. Click Close to close the Results window.


i. Click Cancel to close the prompt window.

j. In the Test the Information Map window, click to remove all items from the Selected items
list box.
k. Double-click the following items to add them to the Selected items list box:
Department
Section
Group
Annual Salary
Select Department, Section, and Group (filter)
l. Click Run Test.
m. Select IS as the value for the Select a Department field.
n. Select IS Operations as the value for the Select a Section field.
o. Select Applications as the value for the Select a Group field.
p. Click OK.

q. Click Close to close the Results window.


r. Click Cancel to close the Prompt window.
s. Click Close to close the Test the Information Map window
5. Create a new prompted filter.
a. Select Insert New Filter.
b. Type Select a Range of Hire Dates in the Filter Name field.
c. Select Employee Hire Date as the value for the Data item field.
d. Select Range of periods (is between) as the value for the Condition field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-60 Chapter 4 Creating Information Maps

e. Select Use single prompt for both 'From' and 'To' values as the value for the Value(s) field.
f. Select &DateRangePrompt as the value for the Prompt field.

After a prompt is defined in an information map, it can be used in more than one filter. In
this example, the prompt used to filter termination dates is reused for filtering hire dates.
g. Click OK to close the New Filter window.
6. Test the information map and existing filters.
a. Select Tools Run a Test Query.

b. Click to remove all items from the Selected items list.

c. Double-click the following items to copy them to the Selected items list box:
Employee Name
Employee Hire Date
Select Range of Hire Dates (filter)
d. Click Run Test.
e. Select Custom as the value for the Range type field.
f. Type January 1, 1975 in the From field.
g. Type March 31, 1975 in the To field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-61

t. Click OK.

u. Click Close to close the Results window.


v. Click Cancel to close the prompt window.
w. Click Close to close the Test the Information Map window
7. Modify the Select Department, Section, and Group filter.
a. Double-click Select Department, Section, and Group.
b. Select the second criteria (Section) in the Filter combinations area and click Edit.
c. Click Edit next to the prompt name (&SectionPrompt).
d. Click the Prompt Type and Values tab.
e. Remove the default value by selecting (none).

f. Click OK to close the Edit Prompt window.


g. Click Update.
h. Select the third criteria (Group) in the Filter combinations area and click Edit.
i. Click Edit next to the prompt name (&GroupPrompt).
j. Click the Prompt Type and Values tab.
k. Remove the default value by selecting (none).
l. Click OK to close the Edit Prompt window.
m. Click Update.
n. Click OK to close the Edit Filter window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-62 Chapter 4 Creating Information Maps

8. Test the updated filter.


a. Select Tools Run a Test Query.

b. Click to remove all items from the Selected items list box.

c. Double-click the following items to add them to the Selected items list:
Department
Section
Group
Annual Salary
Select Department, Section, and Group (filter)
d. Click Run Test.
e. Select DotCom & Catalog as the value for the Select a Section field.
f. Select Catalog as the value for the Select a Group field.
g. Click OK.

h. Click Close to close the Results window.


i. Click Cancel to close the prompt window.
j. Click Close to close the Test the Information Map window.
9. Save the information map, and use a new name.
a. Select File Save As.
b. Type FT Employees Prompting in the Name field.
c. Click Save.
10. Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.3 Exploiting Dynamic Subsetting of Data 4-63

Exercises

5. Creating a Prompted Filter


a. Open SAS Information Map Studio. Use the default connection profile and Ellens credentials.
b. Open the FT US Customer Subset Product Analysis information map created earlier.
c. Create a new filter to prompt the user to select the order type and one or more product groups.
Name the filter Select Order Type and Product Group.
Create a new prompt named OrderTypePrompt that prompts the user for a value using a static
list. Select all available values for the static list. Set Catalog Sale as the default value.
Create a second prompt named ProductGroupPrompt that prompts the user for a value using
a dynamic list. Enable the user to select multiple values.
d. Test the information map.
Select the following items for the test:
Order Type
Product Group
Quantity
Select Order Type and Product Group (filter)
Select Retail Sale as the value for the Order Type.
Select Product Groups that contain the word Shoes.

Hint: Click and search for values that contain the word Shoes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-64 Chapter 4 Creating Information Maps

The test results should resemble the following:

e. Save the information map as FT Product Analysis Prompting and close SAS Information Map
Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-65

4.4 Creating Prefilters to Subset the Information Map Data

Objectives
State the definition of prefilters.
Describe the two types of prefilters.
List the steps to create a general prefilter.
List the steps to create an authorization-based
prefilter.

102

Prefilters
A prefilter is a mechanism to subset relational data before
it becomes available to the user of the information map.

A prefilter can subset data based on simple, compound,


or identity-based criteria.

There are two types of prefilters:


general prefilters

authorization-based prefilters

103

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-66 Chapter 4 Creating Information Maps

Two Types of Prefilters


The two types of prefilters are typically used for different
purposes. Both types of prefilters subset the data source
before it is available to the users of the information map.

General Prefilters Create the same subset of the


data source for all users.

Authorization-Based Create only a subset of the


Prefilters data source for specific users
or groups of users.

104

General Prefilters versus Authorization-Based


Prefilters
General Prefilters Authorization-Based Prefilters
An enforced filter that applies to A conditionally enforced filter
all users of the information map that applies only to specified
users and groups
Does not produce different Might produce different results
results for each user of the for each user of the information
information map map
Executes every time the query is Executes every time the query is
executed executed by an identity that was
associated with the filter

Both types of prefilters are applied before any additional


filters.

105

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-67

Discussion

When would you use each type of prefilter?


general prefilter

authorization-based prefilter

106

How Do Information Map Queries Work?


When an information map is used, the query only
processes the requested data items from the
corresponding data sources.
Example: An information map is based on three
relational tables.

107 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-68 Chapter 4 Creating Information Maps

How Do Information Maps Queries Work?


The only tables used
in the query are those
with selected data items.

Order Type
Supplier Name

108 continued...

How Do Information Maps Queries Work?

PREFILTER:
Customer_Country=FR

Order Type
Supplier Name

109 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-69

How Do Information Maps Queries Work?


Even when there is
a prefilter, the only
tables used are
those with selected
data items.

PREFILTER:
Customer_Country=FR

Order Type
Supplier Name

110 continued...

How Do Information Maps Queries Work?

Required

PREFILTER:
Customer_Country=FR

Order Type
Supplier Name

111 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-70 Chapter 4 Creating Information Maps

How Do Information Maps Queries Work?


If a table is required,
it is used in the query
Required
regardless of whether
data items are
selected from it.

PREFILTER:
Customer_Country=FR

Order Type
Supplier Name

112

Designating a Table as Required


The Table Properties window is one of the places where
you can designate the table as a required table.

113 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-71

Designating a Table as Required


The Information Map Properties window is the other place
where you can designate the table as a required table.

114

Hiding Filters
Filters that are used as
prefilters do not typically
need to be made available
to users of the information
map, because they are
already in effect.

When the Hide from user


option is selected, the filter
is not available in the
SAS application nor is it
available in the testing
facility in SAS Information
Map Studio.

115

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-72 Chapter 4 Creating Information Maps

Establishing a General Prefilter


The following are the typical steps to establish a filter
as a general prefilter:
1. Create the filter and specify the Hide from user
property.
2. Verify that the data source or sources used in the
filter are designated as required tables.
3. Open the Information Map Properties window.
4. Click the General Prefilters tab.

116 continued...

Establishing a General Prefilter


5. Select the filter from the Available filters list box that
you want to use as a prefilter.
6. Select the table that contains the data item or items
that are used
in the filter.
7. Click to
establish the
relationship
between the
filter and the
table.

117

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-73

Establishing an Authorization-Based Prefilter


The following are the typical steps to establish a filter as
an authorization-based prefilter:
1. Create the filter and specify the Hide from user
property.
2. Verify that the data source or sources used in the
filter are designated as required tables.
3. Select Tools Authorization to access the
Authorization window.
4. If necessary, add the user or group that you want to
associate with the prefilter.
5. Select the user or group and explicitly grant the Read
permission, which enables the Add Condition
button.

118 continued...

Establishing an Authorization-Based Prefilter


6. Click Add Condition, which accesses the
Row-Level Permission Condition window.

119 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-74 Chapter 4 Creating Information Maps

Establishing an Authorization-Based Prefilter


7. Select the filter from the Available filters list that you
want to use as a prefilter.
8. Select the table
that contains
the data item or
items that are
used in the filter.
9. Click to
establish the
relationship
between the
filter and the
table.

120

When using a filter based on a measure data item, you receive a warning that the query might
generate unexpected results.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-75

Using Prefilters

This demonstration illustrates how to establish a filter as a prefilter.


1. Select Start All Programs SAS SAS Information Map Studio 4.2.
2. Use Erics credentials to log on.
a. Verify that the connection profile is My Server.
b. Click OK to close the Connection Profile window and access the Log On window.
c. Type Eric in the User ID field and type the password provided by the instructor.
d. Click OK to close the Log On window.
e. If necessary, click OK to close the Create an Information Map window.
3. Access the Orion Star Customer Orders Data information map.

a. If necessary, click to show the Resources pane.

b. If necessary, click to show the Folders tree in the Resources pane.

c. Double-click the Orion Star folder to expand it.


d. Double-click the Marketing Department folder to expand it.
e. Double-click the Information Maps folder to expand it.
f. Double-click the Orion Star Customer Orders Data information map to load it on the Design
tab.

g. Click to hide the Resources pane.

4. Save the information map with a new name.


a. Select File Save As.
b. Type FT Orders 2007 in the Name field.
c. Click Save.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-76 Chapter 4 Creating Information Maps

5. Create a new filter to subset the data for 2007.


a. Select Insert New Filter.
b. Type 2007 in the Filter name field.
c. Select Date Order Was Placed By Customer in the Data item field.
d. Select Range of periods (is between) in the Condition field.
e. Select Specific date/time in the From section.
f. Select January as the month.
g. Select 2007 as the year.
h. Click 01 as the day.
i. Select Specific date/time in the To section.
j. Select December as the month.
k. Select 2007 as the year.
l. Click 31 as the day.

m. Click the Hide from user check box in the bottom left corner of the window.

Because this filter is used as a general prefilter, and therefore always applied, you do not
want the user to be able to select it.
n. Click OK to save the new filter.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-77

Defining a General Prefilter

1. Select Edit Properties Information Map (IMS Orders 2007).


The Information Map Properties window appears.
2. Click the General Prefilters tab.
3. Select 2007.

4. Click to assign the 2007 filter to the Orion Star Customer Order Information table.

If there is more than one table used as a resource in the information map, you must assign the
filter to the table on which the data item in the filter is based. If the filter is a compound filter
based on a data item from more than one table, then the filter must be assigned to each table
that contributes a data item to that filter.
5. Click the Required Tables tab.
6. Double-click Orion Star Customer Order Information to move it to the Required tables list box.
7. Click OK to close the Information Map Properties window and save the changes.

Testing the Information Map

1. Select Tools Run a Test Query.


2. Double-click the following data items to move them to the Selected items list box:
Date Order Was Placed By Customer
Total Retail Price For This Product

The 2007 filter is not an available data item because of the Hide from user setting.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-78 Chapter 4 Creating Information Maps

3. Accept the default output options and click Run Test.

Only orders from 2007 are selected.

4. Click View SQL.

The general prefilter criteria is part of the WHERE clause of the SQL query.

5. Click Close to close the View Query window.


6. Click Close to close the Results window.
7. Click Close to close the Test the Information Map window.
8. Select File Save to save the information map with the same name.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-79

Creating an Authorization-Based Prefilter

1. Open the Orion Star Customer Orders Data information map.


a. Select File Open.
b. Select Orion Star Customer Orders Data.
c. Click OK.
2. Save the information map with a new name.
a. Select File Save As.
b. Type FT Orders by Country in the Name field.
c. Click Save.
3. Create a new filter for orders that were placed by a U.S. customer.
a. Select Insert New Filter.
b. Type US Only in the Filter name field.
c. Select Customer Country in the Data item field.
d. Select Is equal to in the Condition field.
e. Select Select values from a list in the Value(s) field.
f. Double-click United States to move it to the Selected list box.
g. Click the Hide from user check box.
Click OK to close the New Filter window and save the changes.
4. Create a new filter for orders that were placed by a French customer.
a. Select Insert New Filter.
b. Type France Only in the Filter name field.
c. Select Customer Country in the Data item field.
d. Select Is equal to in the Condition field.
e. Select Select values from a list in the Value(s) field.
f. Double-click France to move it to the Selected list box.
g. Click the Hide from user check box.
h. Click OK to close the New Filter window and save the changes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-80 Chapter 4 Creating Information Maps

5. Specify the required table for the filters that will become authorization-based prefilters.
a. Select Orion Star Reporting Library in the Selected Resources list box to expand it.
b. Right-click the Orion Star Customer Order Information table and select Properties.
c. Click Include this table (and its prefilters) in all queries.

This step is optional if only one table is defined as a resource to an information map.

d. Click OK to close the Table Properties window and save the changes.
6. Select File Save to save the changes to the information map.
7. Assign the authorization-based prefilters to the desired users.
a. Select Tools Authorization.
The Authorization window appears.
b. Click Add to add Eric and Jacques to the list of users.
c. Double-click Eric and Jacques to add them both to the Selected Identities list box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-81

d. Click OK to save the changes and return to the Authorization window.


e. Select Eric in the Users and Groups list box.
f. Click the Grant check box for the Read permission to explicitly grant that permission.

An explicit grant is indicated by the lack of background color behind the check box.

g. Click Add Condition.

The Add Condition button only becomes active when the selected user or group has an
explicit Read permission.
The Row-Level Permission Condition window appears.
h. Select US Only in the Available filters list box.

i. Click to assign the US Only filter to the Orion Star Customer Order Information table.

j. Click OK to save the changes and close the Row-Level Permission Condition window.
k. Select Jacques in the Users and Groups list box.
l. Click the Grant check box for the Read permission to explicitly grant that permission.
m. Click Add Condition.
n. Select France Only.

o. Click to assign the France Only filter to the Orion Star Customer Order Information
table.
p. Click OK to save the changes and close the Row-Level Permission Condition window.
q. Click Close to close the Authorization window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-82 Chapter 4 Creating Information Maps

8. Test the information map.


a. Select Tools Run a Test Query.
b. Click Yes when you are prompted to save the changes to the information map.

c. Double-click the following data items to move them to the Selected items list box:
Customer Country
Customer Age Group
Quantity Ordered

The US Only and France Only filters are not available because of the Hide from user
setting.
d. Accept the default output options. Click Run Test.

e. Click Close to close the Results window.


f. Click Close to close the Test the Information Map window.
9. Test the information map with Jacques' credentials.
a. Select File Connection Profile.
b. Click Yes when you are prompted to disconnect from the metadata server.
c. Click OK to accept the default connection profile.
d. Type Jacques in the User ID field and type the password provided by the instructor.
e. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.4 Creating Prefilters to Subset the Information Map Data 4-83

f. Select File Open.


g. Double-click the Orion Star folder.
h. Double-click the Marketing Department folder.
i. Double-click the Information Maps folder to expand it.
j. Double-click the FT Orders by Country information map to load it on the Design tab.
k. Select Tools Run a Test Query.
l. Double-click the following data items to move them to the Selected items list box:
Customer Country
Customer Age Group
Quantity Ordered
m. Accept the default output options and click Run Test.

n. Click Close to close the Results window.


o. Click Close to close the Test the Information Map window.
10. Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-84 Chapter 4 Creating Information Maps

4.5 Building an Information Map from a SAS OLAP Cube

Objectives
Discuss the Online Analytical Processing terminology.
Describe the capabilities available when creating an
information map from an OLAP cube.
Discuss the MDX language, including what it is and
when it is used.

124

Information Maps
Information maps can be based on one or more tables,
a stored process that creates a table, or a cube.

125
1
2
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.5 Building an Information Map from a SAS OLAP Cube 4-85

Information Maps and OLAP Cubes


There are several things to consider when building
information maps with an OLAP data source.
An information map can be built from a single OLAP
cube only.
Stored processes cannot be associated with
information maps that use an OLAP cube as a data
source.
Only simple filters can be created in information maps
that use an OLAP cube as a data source.

126

What Is MDX?
The multidimensional expressions (MDX) language
has the following characteristics and uses:
is a standardized, high-level language

is used for querying multidimensional data sources

is used to manipulate multidimensional information

is considered to be the multidimensional equivalent


of SQL

127

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-86 Chapter 4 Creating Information Maps

Why Learn MDX?


SAS OLAP Viewers communicate with the SAS OLAP
Server using MDX behind the scenes.
When you use SAS Information Map Studio, you can use
MDX to create new data items.

128

Enhancing an Information Map


After adding the SAS OLAP cube as the data source,
consider these tasks for enhancing the information map:
create folders to help organize the items

customize existing data items

create new data items

129
1
2
9

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.5 Building an Information Map from a SAS OLAP Cube 4-87

Creating a New Data Item


New data items can be created using MDX.

A new data item is a


metadata instruction
for how to calculate
the data value. When
you create a new data
item, you create an
expression that is
executed dynamically
each time that the
information map is
accessed.

130
1
3
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-88 Chapter 4 Creating Information Maps

Creating an Information Map Using an OLAP Cube

This demonstration illustrates how to build an information map using an OLAP cube as the data source.
1. Select Start All Programs SAS SAS Information Map Studio 4.2.
2. Log on. Use Erics credentials.
a. Accept the default connection profile and click OK.
b. Type Eric in the User ID field and type the password provided by the instructor.
c. Click OK to close the Log On window.
d. If necessary, click OK to close the Create an Information Map window.
3. Add an OLAP cube as the data source.

a. If necessary, click to show the Resources pane.

b. Click (the Application Servers tab) in the Resources pane.

c. Select Cubes as the value for the Show field.


d. Double-click Orion Star Customer Order Cube to add it to the Selected Resources list box of
the Design tab.

e. Click to hide the Resources pane.

4. Expand Orion Star Customer Order Cube.

5. Click to create data items for all of the measures and hierarchies in the cube.

6. Change the description for the Ym data item.


a. Select Ym Hierarchy in the Information Map Contents list box.
b. Using the Properties pane, type Year, Month Hierarchy in the Data item name field and press
ENTER to update the value.
7. Change the description for the Yqm data item.
a. Select Yqm Hierarchy in the Information Map Contents list box.
b. Using the Properties pane, type Year, Quarter, Month Hierarchy in the Data item name field
and press ENTER to update the value.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.5 Building an Information Map from a SAS OLAP Cube 4-89

8. Test the information map.


a. Select Tools Run a Test Query.
b. Select the following data items by double-clicking them or by selecting them and using the arrow
buttons:
Sum Of Total Retail Price
Product Hierarchy
Year, Month Hierarchy
c. Click in the Role column for the Year, Month Hierarchy, and select Row.

d. Click Run Test.

e. Double-click 2006 to drill down to the next level.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-90 Chapter 4 Creating Information Maps

f. Right-click Clothes & Shoes and select Expand.

g. Click View MDX to view the MDX query code that was run for the test.

h. Click Close to close the View Query window.


i. Click Close to close the Results window.
j. Click Close to close the Test the Information Map window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.5 Building an Information Map from a SAS OLAP Cube 4-91

9. Save the information map and close SAS Information Map Studio.
a. Select File Save As.
b. If necessary, navigate to Orion Star Marketing Department Information Maps.
c. Type FT Customer Orders in the Name field.
d. Click Save.
e. Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-92 Chapter 4 Creating Information Maps

4.6 Solutions

Solutions to Exercises
1. Creating a New Information Map from Relational Data
a. Open SAS Information Map Studio using the default connection profile and Ellens credentials.
1) Select Start All Programs SAS SAS Information Map Studio 4.2.
2) Verify that the connection profile is My Server and click OK.
3) Type Ellen in the User ID field and type the password provided by the instructor
4) Click OK.
5) If necessary, click OK to close the Create an Information Map window.
b. Create a new information map from the FT US Customer Subset table in FT Library.

1) If necessary, click to show the Resources pane.

2) Click (the Applications Server tab) in the Resources pane.


3) Expand FT Library.
4) Double-click the FT US Customer Subset table to add it to the Selected Resources list box.

5) Click to hide the Resources pane.

6) Expand FT Library and FT US Customer Subset.


7) Hold down the CTRL key and select all of the physical columns except the following:
Customer_BirthDate
Customer_ID
Delivery_Date
Employee_ID
Order_ID
Product_ID
Street_ID
8) Click to create data items for the selected columns.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-93

9) Change the value-generation method for several columns to User selects values from a
dynamic list.
a) Hold down the CTRL key and select the following columns:
Customer Age Group
Customer Country
Product Category
Product Group
Product Line
Supplier Country
Supplier Name
b) Click the black triangle ( ) in the value cell for the Value-generation property.
c) Click the User selects values from a dynamic list radio button.
d) Click OK to save the changes and close the Data Item Properties window.
10) Change the value-generation method for several columns to User selects values from a
static list and build the list by querying the data.
a) Double-click Customer Gender.
b) Select Value-Generation Method.
c) Select User selects values for a static list (defined below).
d) Click Get Values.
e) If a Get Values message window appears, click OK to close it.

f) Click to add all of the values to the Selected values list box.

g) Click OK to close the Get Values window.


h) Click OK to close the Data Item Properties window.
i) Double-click Order Type.
j) Select Value-Generation Method.
k) Select User selects values for a static list (defined below).
l) Click Get Values.
m) If a Get Values message window appears, click OK to close it.

n) Click to add all of the values to the Selected values list box.

o) Click OK to close the Get Values window.


p) Click OK to close the Data Item Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-94 Chapter 4 Creating Information Maps

11) Set the format for Costprice Per Unit and Total Retail Price to the DOLLAR14. format.
a) Hold down the CTRL key and select Costprice Per Unit and Total Retail Price.
b) Click the black triangle ( ) in the value cell for the Format property.
c) Select DOLLAR as the value for the Format name field.
d) Type 14 in the Valid width range field.
e) Click OK to close the Data Item Properties window.
12) Set the format for Quantity to the COMMA12. format.
a) Double-click Quantity to open the Data Item Properties window.
b) Select Classifications, Aggregations, Formats.
c) Select COMMA as the value for the Format name field.
d) Type 12 in the Valid width range field.
e) Click OK to close the Data Item Properties window.
13) Set several columns as default columns for SAS Web Report Studio.
a) Hold down the CTRL key and select the following data items:
Costprice Per Unit
Customer Gender
Order Type
Quantity
Total Retail Price
b) Click the black triangle ( ) in the value cell for the Default query property.
c) Change the value to Yes.
14) Test the new information map.
a) Select Tools Run a Test Query.
b) Double-click Customer Gender, Order Type, Quantity, and Total Retail Price to add
them to the Selected items list box.
c) Click Run Test.
d) Click Close to close the View Query window.
e) Click Close to close the Results window.
f) Click Close to close the Test the Information Map window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-95

c. Save the new information map as FT US Customer Subset in Orion Star Sales
Department Information Maps and close SAS Information Map Studio.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Information Maps.
3) Type FT US Customer Subset in the Name field.
4) Click Save.
5) Select File Exit to close SAS Information Map Studio.
2. Creating a Report in SAS Web Report Studio Using the New Information Map
a. Log on to SAS Web Report Studio with Ellens credentials.
1) Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by
selecting Start All Programs Internet Explorer.
2) Select Favorites SAS Web Report Studio.
3) Type Ellen in the User name field and type the password provided by your instructor.
b. Directly open the FT US Customer Subset information map that you saved.
1) Click File Open.
2) Navigate to Orion Star Sales Department Information Maps.
3) Select FT US Customer Subset.
4) Click Open.

c. Why was the report created with these five data items?
These five data items all have the Default Query attribute set to Yes.
d. Log off and close the browser window
1) Click Log off Ellen.
2) Select File Exit to close the browser.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-96 Chapter 4 Creating Information Maps

3. Creating a Compound Filter


a. Open SAS Information Map Studio. Use the default connection profile and Ellens credentials.
1) Select Start All Programs SAS SAS Information Map Studio 4.2.
2) Verify that the connection profile is My Server and click OK.
3) Type Ellen in the User ID field and type the password provided by the instructor
4) Click OK.
5) If necessary, click OK to close the Create an Information Map window.
b. Create a new information map from the FT US Customer Subset table in FT Library.

1) If necessary, click to show the Resources pane.

2) Click (the Applications Server tab) in the Resources pane.


3) Expand FT Library.
4) Double-click the FT US Customer Subset table to add it to the Selected Resources list box.

5) Click to hide the Resources pane.

6) Expand FT Library and FT US Customer Subset.


7) Double-click each of the following physical columns to create data items from them:
Order_Type
Product_Group
Quantity
Supplier_Name
Total_Retail_Price
6) Change the value-generation method for several columns to User selects values from a
dynamic list.
a) Hold down the CTRL key and select the following columns:
Product Group
Supplier Name
b) Click the black triangle ( ) in the value cell for the Value-generation property.
c) Click the User selects values from a dynamic list radio button.
d) Click OK to save the changes and close the Data Item Properties window.
7) Change the value-generation method for Order Type to User selects values from a static list
and build the list by querying the data.
a) Double-click Order Type.
b) Select Value-Generation Method.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-97

c) Select User selects values for a static list (defined below).


d) Click Get Values.
e) Click OK in the message window.

f) Click to add all of the values to the Selected values list box.

g) Click OK to close the Get Values window.


h) Click OK to close the Data Item Properties window.
8) Set the format for Total Retail Price to the DOLLAR14. format.
a) Double-click Total Retail Price to open the Data Item Properties window.
b) Click the black triangle ( ) in the value cell for the Format property.
c) Select DOLLAR as the value for the Format name field.
d) Type 14 in the Valid width range field.
e) Click OK to close the Data Item Properties window.
9) Set the format for Quantity to the COMMA12. format.
a) Double-click Quantity to open the Data Item Properties window.
b) Select Classifications, Aggregations, Formats.
c) Select COMMA as the value for the Format name field.
d) Type 12 in the Valid width range field.
e) Click OK to close the Data Item Properties window.
10) Create a new compound filter to select retail shoe sales.
a) Select Insert New Filter.
b) Type Retail Shoe Sales in the Filter name field.
c) Select Order Type as the value for the Data item field.
d) Verify that Is equal to is selected as the value for the Condition field.
e) Select Select value(s) from a list as the value for the Value(s) field.
f) Double-click Retail Sale to copy it to the Selected list box.
g) Click Combinations.
h) Click Add.
i) Select Product Group as the value for the Data item field.
j) Select Contains as the value for the Condition field.
k) Verify that Enter value(s) is selected as the value for the Value(s) field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-98 Chapter 4 Creating Information Maps

l) Type "Shoes" in the second box in the Value(s) field.

Text values are case sensitive and must be enclosed in quotation marks.

m) Click Add.
The Filter Combinations should resemble the following:

n) Click OK to close the New Filter window.


11) Test the new information map.
a) Select Tools Run a Test Query.

b) Click to add all of the items to the Selected items list box.

c) Click Run Test.

d) Click Close to close the View Query window.


e) Click Close to close the Results window.
f) Click Close to close the Test the Information Map window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-99

c. Save the new information map as FT US Customer Subset Product Analysis in Orion Star
Sales Department Information Maps and close SAS Information Map Studio.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Information Maps.
3) Type FT US Customer Subset Product Analysis in the Name field.
4) Click Save.
5) Select File Exit to close SAS Information Map Studio.
4. Using the New Information Map as a Data Source in SAS Enterprise Guide
a. Open SAS Enterprise Guide and create a new project using Ellens credentials.
1) Select Start All Programs SAS Enterprise Guide 4.3 to invoke SAS Enterprise
Guide.
2) Select New Project from the Welcome window.
3) If necessary, click Connection and change the connection profile to use Ellens credentials.
b. Open the FT US Customer Subset Product Analysis information map.
1) Select File Open Information Map.
2) Navigate to Orion Star Sales Department Information Maps.
3) Select FT US Customer Subset Product Analysis.
4) Click Open.

5) Click to select all of the data items.

6) Click the Filters tab.


7) Double-click Retail Shoe Sales to add it to the Selected filters list box.
8) Click OK to load the data from the information map into SAS Enterprise Guide.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-100 Chapter 4 Creating Information Maps

c. Save the project as FT Retail Shoe Sales in S:\Workshop\sbaft43 and close SAS Enterprise
Guide.
1) Select File Save Project As.
2) Navigate to My Computer S: Workshop sbaft43.
3) Type FT Retail Shoe Sales as the value File name for the field.
4) Click Save.
5) Select File Exit to close SAS Enterprise Guide.
6) Click OK when prompted to close the project.
5. Creating a Prompted Filter
a. Open SAS Information Map Studio. Use the default connection profile and Ellens credentials.
1) Select Start All Programs SAS SAS Information Map Studio 4.2.
2) Verify that the connection profile is My Server and click OK.
3) Type Ellen in the User ID field and type the password provided by the instructor
4) Click OK.
5) If necessary, click OK to close the Create an Information Map window.
b. Open the FT US Customer Subset Product Analysis information map created earlier.
1) Select File Open.
2) If necessary, navigate to Orion Star Sales Department Information Maps.
3) Select FT US Customer Subset Product Analysis.
4) Click OK.
c. Create a new filter to prompt the user to select the order type and one or more product groups.
1) Select Insert New Filter.
2) Type Select Order Type and Product Group in the Filter name field.
3) Select Order Type as the value for the Data item field.
4) Verify that Is equal to is selected as the value for the Condition field.
5) Select Prompt the user for value(s) as the value for the Value(s) field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-101

6) Click New.
7) Type OrderTypePrompt in the Name field.
8) Type Select an Order Type in the Displayed text field.
9) Click the Prompt Type and Values tab.
10) Select User selects value from a static list as the value for the Method for populating
prompt field.
11) Click Get Values.

12) Click to add all of the values to the Selected values list box.

13) Click OK to close the Get Values windows.


14) Click the radio button to make Catalog Sale the default value.
15) Click OK to close the New Prompt window.
16) Click Combinations.
17) Click Add.
18) Select Product Group as the value for the Data item field.
19) Verify that Is equal to is selected as the value for the Condition field.
20) Select Prompt the user for value(s) as the value for the Value(s) field.
21) Click New.
22) Type ProductGroupPrompt in the Name field.
23) Type Select a Product Group in the Displayed text field.
24) Click the Prompt Type and Values tab.
25) Select User selects value from a dynamic list as the value for the Method for populating
prompt field.
26) Select Multiple values as the value for the Number of values field.
27) Click OK to close the New Prompt window.
28) Click Add.
29) Click OK to close the New Filter window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-102 Chapter 4 Creating Information Maps

d. Test the information map.


1) Select Tools Run a Test Query.
2) Double-click the following items to add them to the Selected items list box.
Order Type
Product Group
Quantity
Select Order Type and Product Group (filter)
3) Click Run Test.
The Prompt window appears.

4) Select Retail Sale as the value for the Select an Order Type field.

5) Click in the Select a Product Group section.

6) Type Shoes next to Contains in the Search criteria field.


7) Click Search.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-103

8) Click to select all of the items.

9) Click Select.
10) Click OK to run the test.

11) Click Close to close the View Query window.


12) Click Close to close the Results window.
13) Click Close to close the Test the Information Map window.
e. Save the information map as FT Product Analysis Prompting and close SAS Information Map
Studio.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Information Maps.
3) Type FT US Product Analysis Prompting in the Name field.
4) Click Save.
5) Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-104 Chapter 4 Creating Information Maps

Solutions to Student Activities (Polls/Quizzes)

4.01 Poll Correct Answer


The interface for adding an information map in the
SAS Add-In for Microsoft Office and SAS Enterprise
Guide enables you to select the information map
much as you would select any other data source.
True
False

Although the interface seems to provide direct


access to the information map, behind the scenes
the SAS Information Maps LIBNAME Engine is used
by both the SAS add-in and SAS Enterprise Guide.

10

4.02 Quiz Correct Answer


What is the difference between what is displayed on
the Information Map Folders tab and the Application
Servers tab?

The Information Map Folders tab displays information


maps stored in the SAS Folders structure.

The Application Servers tab displays data sources


such as libraries, tables, cubes, and stored
processes.

17

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-105

4.03 Quiz Correct Answer


Match each item with the correct description.

1. Data Item B. Metadata about a physical column or


expressions to calculate values
2. Filter A. Contains instructions for subsetting
the values
3. Folder C. Used to organize the information map

25

4.04 Multiple Choice Poll Correct Answer


When can you add a stored process as a data source?
a. Anytime
b. After you added a table
c. After you added an OLAP cube

33

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-106 Chapter 4 Creating Information Maps

4.05 Quiz Correct Answer


Identify the default data item classification for each
physical column listed below:
Employee Name Category
Employee ID Category
Salary Measure
Hire Date Category

42

4.06 Quiz Correct Answer


What is the difference between a simple filter and
a compound filter?

Simple filters contain a single condition, and


compound filters contain multiple conditions.

68

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4.6 Solutions 4-107

4.07 Quiz Correct Answer


What is the result of using each example below with
a filter that contains a LIKE condition?
'te_t'
The underscore wildcard is used in place of a
single character. The example above matches
both test and text.

'test%'
The percent wildcard is used in place of zero or
more characters. The example above matches
both test and testing.

79

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
4-108 Chapter 4 Creating Information Maps

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 5 Creating Stored
Processes

5.1 Understanding SAS Stored Process Concepts ........................................................... 5-3


Demonstration: Running a Stored Process in SAS Enterprise Guide ................................. 5-15

Exercises .............................................................................................................................. 5-18

5.2 Creating a Stored Process from a SAS Enterprise Guide Project ........................... 5-19
Demonstration: Creating New Stored Processes Using SAS Enterprise Guide .................. 5-35

Exercises .............................................................................................................................. 5-46

5.3 Creating a Stored Process from a SAS Program....................................................... 5-47


Demonstration: Creating a Stored Process from Existing SAS Program Code ................... 5-51

Exercises .............................................................................................................................. 5-55

5.4 Creating Stored Process Parameters ......................................................................... 5-56


Demonstration: Creating a Stored Process with a Prompt to Filter Data ............................. 5-71

Exercises .............................................................................................................................. 5-83

5.5 Creating Advanced Prompts ....................................................................................... 5-84


Demonstration: Creating a Stored Process with Cascading Prompts ................................. 5-87

Demonstration: Creating a Stored Process with a Selection Group .................................... 5-97

5.6 Solutions ..................................................................................................................... 5-106


Solutions to Exercises ........................................................................................................ 5-106

Solutions to Student Activities (Polls/Quizzes) ................................................................... 5-119

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-2 Chapter 5 Creating Stored Processes

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-3

5.1 Understanding SAS Stored Process Concepts

Objectives
Describe the different types of functionality provided
by SAS Stored Processes.
List the SAS platform applications where you can run
stored processes.
List the SAS platform applications where you can
register stored processes.
List the SAS platform applications where you can
create stored processes.

SAS Programs
A SAS program is a sequence of steps that the user
submits for execution.
DATA steps are typically used to create
Raw
SAS data sets.
Data

DATA SAS PROC Report


Step Data Step
Set
SAS
Data PROC steps are typically used to process
Set SAS data sets (that is, generate reports
and graphs, manage data, and sort data).

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-4 Chapter 5 Creating Stored Processes

What Is a SAS Stored Process?


A SAS Stored Process is a special type of SAS program.
Stored processes enable you to run a SAS program
and view the results in many different types of
SAS applications.
Stored processes consist of a SAS program file and a
metadata definition that describes how the stored process
should execute.

Comparing a Program to a Stored Process


Consider the difference between these two methods
of executing SAS programs:

SAS
SAS Program
Stored Process

One programmer or group is One programmer or group is


responsible for developing, responsible for developing
testing, and executing the and testing the stored
program. process.

The programmer or group Business users can view the


also manages the results of the stored process
distribution of the results. on their own using different
types of SAS applications.
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-5

Advantages of Stored Processes


SAS Stored Processes have several advantages over
traditional SAS programs.
Stored processes can prompt users for input through
parameters. This allows for code that is not static and
can be easily run with different values.
Because stored process code is not embedded into
client applications, there is only one copy of the code
to maintain.
Every application that runs a stored process always
gets the latest version of the results.
Stored process programs use security to ensure that
each user has access only to the information that he
or she is allowed to see.

5.01 Multiple Answer Poll


Which of the following statements about SAS Stored
Processes are true?
a. A SAS Stored Process consists of both SAS program
code and SAS metadata.
b. A SAS Stored Process can be run only by the person
who created it.
c. A SAS Stored Process is always static and creates the
same results for every user every time it runs.
d. All SAS Stored Processes can be accessed by
everyone regardless of their security settings.
e. There are different types of SAS applications that can
run stored processes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-6 Chapter 5 Creating Stored Processes

What Can a Stored Process Access?


A stored process can access almost any SAS data
source or external file. However, you cannot activate
SAS interactive windows (such as the GRAPH window
or the Keys window) inside your stored process program.

SAS Data
External
Sources
Files

11

By default, you cannot activate a system or command window from a stored process. This means
that you would not be able to programmatically invoke a shell script or issue a command to start a
batch file. The ability to run external (operating system commands) is generally not enabled on
the servers that run stored processes.

What Can a Stored Process Create?


A stored process can create new data sets, files,
and report output in a variety of formats.

Results
SAS ODS Package
Output

SAS Data
External
Sources SAS Catalog E-mail Files
Entry

12

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-7

Stored Processes and the SAS Platform


Stored processes are an important part of the SAS
platform and can be used to accomplish the following:
Create analyses and reports

Access the results from many different applications

Provide dynamic capabilities by using the


SAS prompting framework
Extend out-of-the box capabilities of some of
the SAS platform applications
Add functionality to custom Web applications

13

Where Can a Stored Process Be Used?


Stored processes can be invoked from many of the
SAS platform applications.

SAS Add-In for SAS Information


Microsoft Office Delivery Portal

SAS SAS Web


Enterprise Guide Report Studio

SAS Information
SAS Stored Process
Map Studio
Web Application
SAS Visual BI SAS BI
(JMP Software) Dashboard
14

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-8 Chapter 5 Creating Stored Processes

How Are Stored Processes Created?


Stored process programs can be created using
the SAS windowing environment or several other
SAS platform applications.
Stored process metadata can be registered using
SAS Management Console, SAS Enterprise Guide,
and other methods.

+ =
Create the stored Register the stored A stored process can
process program. process metadata. be invoked from
platform applications.

15

Client Applications and Stored Processes


Stored Processes
Client Application Create Register Execute Execution Servers
SAS Management Console N Y N not applicable
SAS Data Integration Studio Y Y N not applicable
SAS Enterprise Guide Y Y Y
SAS Add-In for Microsoft Office N N Y
Workspace
SAS Web Report Studio N N Y
Server
SAS Information Delivery Portal N N Y Stored Process
SAS Stored Process Web Application N N Y Server
SAS Visual BI Y N Y
SAS BI Dashboard N N Y Stored Process Server
SAS Information Map Studio N N Y Workspace Server

16

SAS Enterprise Guide is the only SAS platform application that can create, register, and execute
SAS Stored Processes. For example, SAS Management Console can only register stored
processes, whereas other SAS platform applications can only execute stored processes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-9

Running a SAS Stored Process


A stored process without parameters executes and
immediately returns results to the requesting client
application. However, if a stored process is defined with
parameters, the user is prompted to select parameter
values. The stored process uses those values, as coded
in the stored process program, and results are then
displayed.

A user selects 2003,


and the stored
process uses that
value for the report.

17

SAS Stored Processes and the SAS Add-In


A SAS Stored Process enables you to add custom report
output to Microsoft Office applications.
A SAS Stored Process has the following properties:
Can be executed by Microsoft Excel, Microsoft
PowerPoint, Microsoft Word, Microsoft Outlook, and
in many other SAS platform applications
Might enable you to select parameters for controlling
the results of the output

18

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-10 Chapter 5 Creating Stored Processes

SAS Web Report Studio Interface


SAS Web Report Studio requires
you to log on before you can access
and build reports.

After your credentials are


validated, the File menu provides
access to the various actions that
you can perform.

19

Report Objects: Stored Process


A stored process is a SAS program stored on a server
that executes and returns results to a report section.

20

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-11

Running a Stored Process in the Portal


Methods for running a stored process from the portal
include these:
Use the Search tool to locate the stored process and
run from the search results.
If the stored process is added to a collection or
bookmarks portlet, run it directly from your portal page.
Use the SAS Stored Process portlet to display the
results of a selected stored process.

21

SAS Stored Process Portlet


A SAS Stored Process Portlet displays the results of a
stored process. You can edit the properties of the portlet
to change the selected stored process and to specify the
stored process parameters.

22

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-12 Chapter 5 Creating Stored Processes

SAS Stored Process Web Application


The SAS Stored Process Web Application is a Java Web
application that can run stored processes and return
results to a Web browser.

23

Using the Welcome Page


After you log on to the SAS Stored Process Web
Application, a default Welcome page is displayed.

24

You can invoke a stored process directly using the URL for the SAS Stored Process Web Application. It is
not necessary to use the SAS Stored Process Web Application interface.
Example: Use the following URL to invoke the Sales by Order Type and Age Group stored process,
located in the Orion Star Marketing Department Stored Process metadata folder:
http://localhost:8080/SASStoredProcess/do?_action=properties&_program=
/Orion+Star/Marketing+Department/Stored+Processes/Sales+by+Order+
Type+and+Age+Group

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-13

SAS Enterprise Guide


SAS Enterprise Guide provides a point-and-click interface
for manipulating data and generating reports.

25

Stored Processes and SAS Enterprise Guide


SAS Enterprise Guide provides an integrated solution for
authoring, editing, and testing stored processes. Without
leaving the SAS Enterprise Guide environment, you can
perform the following actions:
Create stored processes from existing or new
SAS code
Create stored processes from one or more
SAS Enterprise Guide tasks
Register stored process metadata and manage stored
process source code
Execute stored processes to test their functionality

26

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-14 Chapter 5 Creating Stored Processes

What Is SAS Management Console?


SAS Management Console provides the platform
administrator a primary point of control for administering
the platform for SAS Business Analytics.

27

Stored Processes and SAS Management


Console
SAS Management Console is used to register the
metadata for new stored processes as well as manage
the metadata for existing stored processes.
You can also use
SAS Management
Console to define
shared prompts
and shared prompt
groups.

28

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-15

Running a Stored Process in SAS Enterprise Guide

This demonstration illustrates how to use SAS Enterprise Guide to create a new project and view the
results of a stored process.
1. Select Start All Programs SAS SAS Enterprise Guide 4.3 to invoke SAS Enterprise
Guide.
2. Select New Project from the Welcome window.
3. If necessary, follow these steps to change the connection profile to use Erics credentials.
a. Click Connection to open the Connections window.
b. Select the My Server profile and click Modify.
c. Type Eric in the User field and type the password provided by your instructor.
d. Click Save.
e. Click Set Active.
f. Click Close to close the Connections window.
4. To add a stored process to the project, select File Open Stored Process.
5. Select Orion Star Open.
6. Select Marketing Department Open.
7. Select Stored Processes Open.
8. Select Sales by Order Type and Age Group Open.
9. Right-click on the stored process in either the Project Tree or Process Flow window and select
Run Sales by Order Type and Age Group.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-16 Chapter 5 Creating Stored Processes

Because this stored process has parameters, a window specifies those parameters.

10. Select 2007 as the value for the Select a year for the report field.
11. Click Run.
The stored process is executed and the output is displayed.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.1 Understanding SAS Stored Process Concepts 5-17

12. Click the Log tab.


13. Scroll down and view the PROC REPORT SAS code that created the stored process.

14. Click (the Close icon) to close the stored process results and return to the Process Flow window.

15. Select File Exit to close SAS Enterprise Guide.


16. Click No when you are asked to save changes to the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-18 Chapter 5 Creating Stored Processes

Exercises

1. Using SAS Web Report Studio


Use SAS Web Report Studio to run the Product Sales by Customer Age Group stored process for
the year 2007 without building a new report.
Log on as Ellen.
Select the stored process from the SAS metadata folders.
Log off from SAS Web Report Studio.
Close the browser.

Hints: Using Internet Explorer, select Favorites SAS Web Report Studio.
Select File Open to navigate the SAS Folders tree and select a stored process to run.
Select Log Off Ellen to log off from SAS Web Report Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-19

5.2 Creating a Stored Process from a SAS Enterprise Guide


Project

Objectives
List the steps to create a stored process.
Identify the typical stored process program structure.
Identify the types of stored process metadata.
List the types of servers that a stored process
can run on.
Assign a SAS library using the metadata LIBNAME
engine.
Discuss the differences between creating a stored
process from a single task versus all the tasks in a
SAS Enterprise Guide project.
Describe the extra step needed to create a stored
process from more than one task and fewer than all
of the tasks in a SAS Enterprise Guide project.

33

Creating a Stored Process


There are three basic steps that create a stored process:

Step 1: Create the stored process program code.

Step 2: Register the stored process metadata.

Step 3: Test the new stored process.

34

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-20 Chapter 5 Creating Stored Processes

Step 1: Creating the Stored Process Code


Stored processes can be created using several
SAS platform applications.

SAS Windowing Environment, SAS Data Integration Studio


SAS Visual BI,
or a text-editing program

SAS Enterprise Guide

35

Step 2: Registering the Metadata


Metadata describes the attributes of stored processes
and includes the following items:
Descriptive data

Execution environment

Prompts

Security options

36

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-21

Step 3: Testing the New Stored Process


It is important for the stored process developer to test
the new stored process before making it available for other
people to access.

SAS Add-In for SAS Information


Microsoft Office Delivery Portal

SAS SAS Web


Enterprise Guide Report Studio

SAS Information SAS Stored Process


Map Studio Web Application
SAS Visual BI SAS BI
37 (JMP Software) Dashboard

Where Is a Stored Process Defined and Stored?


A stored process is a SAS program defined by metadata
and stored in a source code repository.
.SAS File
*ProcessBody;
libname orstar "S:\Workshop\OrionStar\orstar" access=readonly;
data selected;
set orstar.customer_dim;
where Customer_Country="&ISP_Country";
run;
%stpbegin;
proc gchart data=selected;
vbar Customer_Age_Group / subgroup=Customer_Gender;
format Customer_Gender $Gender.;
run; quit;
%stpend;

stored process
stored process
Metadata
Server stored process

38 Metadata Repository Source Code Repository

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-22 Chapter 5 Creating Stored Processes

SAS Program versus Stored Process Program


A stored process program includes the original SAS code
as well as additional SAS statements and macros.
Stored process programs can be run only by the
SAS platform servers. They cannot be run by traditional
interactive SAS programming environments such as the
SAS windowing environment or in batch mode.
SAS Program
ods html file='original.html';

proc report data=lib.data nowd;


Stored Process Program
title "Shoe Sales by Country"; *ProcessBody;
%stpbegin;
column Country Total_Retail_Price;
rbreak after / summarize;
run; proc report data=lib.data nowd;
title "Shoe Sales by Country";
ods html close; column Country Total_Retail_Price;
rbreak after / summarize;
run;

%stpend;
39

Stored Process Program Code Elements


The additional SAS statements and macros that define
a stored process program include the following:

*ProcessBody; This comment initiates input parameter


processing on the workspace server.
%STPBEGIN; This macro initializes the Output
Delivery System (ODS) to generate
output from the stored process and
creates several macro variables.
%STPEND; This macro terminates ODS
processing and completes delivery
of the output to the client or other
destinations.

40

You must include a semicolon at the end of the %STPBEGIN and %STPEND macro calls.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-23

Stored Processes in SAS Enterprise Guide


When interacting with a stored process in SAS Enterprise
Guide, you can access the SAS code that is the basis for
the stored process.

41

Stored Process Descriptive Attributes


The attributes that describe the stored process include
the following:
Stored
process
name
SAS
Folders
location
Description

Keywords

42

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-24 Chapter 5 Creating Stored Processes

Stored Process Execution Options


The stored process execution options include the
following:
Execution
server
Source
filepath
Source
filename
Output
result types

43

Stored Process Execution Server


Stored processes can run on two types of SAS servers:
SAS Stored This server is a SAS session specifically
Process designed to execute stored processes.
Server It handles multiple users.
The server includes a load-balancing algorithm
that distributes client requests between the
server processes.
SAS This server is a SAS session that surfaces
Workspace the SAS programming environment to
Server SAS applications.
In a standard configuration, a new server
process is created for each client connection.
In a pooled configuration, a finite set of server
processes are reused by the different client
connections.
44

The stored process server implements several features that are not available on the workspace server,
including streaming output.
Workspace servers and stored process servers are initialized by the SAS Object Spawner.

An object spawner runs on each machine where you want to run a workspace server or where a
stored process server listens for requests and launches servers, as necessary.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-25

5.02 Multiple Answer Poll


Which of the following describe the SAS Stored Process
Server?
a. Handles multiple users
b. Automatically handles multiple concurrent client
requests
c. Is specifically designed to execute stored processes

46

Stored Process Output Options


When a stored process is run from one of the SAS
platform applications, results are created based on
selections in the metadata.
Streaming Provides a single stream of output data to
Output the application that requested the stored
process. No output file is stored on the
server.
Package Combines the output files that are created
Output by the execution server into one result
package that is returned to the client
application. The client application then
unpacks the contents of the package and
displays the files appropriately.
48

Streaming output returns only one file with the result set. Some SAS procedures embed images in
their ODS results. If the tasks in your stored process use these procedures, and if you only select
streaming output, then the image files are not returned when you execute the stored process.
Broken image links appear in your HTML results.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-26 Chapter 5 Creating Stored Processes

Stored Process Output Options


The output options are defined as part of the metadata
when you register the stored process.

49

Stored Process Prompts


Stored process prompts enable the user to interact with
the stored process program.

50

Stored process prompts are also referred to as parameters.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-27

Stored Process Prompts


The SAS Prompting Framework provides a standard
way to prompt users for values when using the various
SAS platform applications. SAS Stored Processes receive
the values from the prompting framework as stored
process parameters.

51

Stored Process Data Sources


You can specify input
data sources to use
when the stored
process runs. These
data sources are also
called input streams.
Generic streams and
XML schema
specifications can
send data that is too
large to be passed in
parameters between
the client and the
executing stored
52
process.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-28 Chapter 5 Creating Stored Processes

SAS LIBNAME Statement


SAS programs typically use a LIBNAME statement
to access data sources.
The LIBNAME statement assigns a library reference
name (libref) to a SAS library.
General form of the LIBNAME statement:

LIBNAME libref 'SAS-data-library' <options>;

53

Accessing SAS Data in a Stored Process


When you convert a SAS program to a stored process
program, it is a best practice to modify the LIBNAME
statement to use the metadata LIBNAME engine.
The metadata LIBNAME engine (MLE) enables
SAS programmers to write LIBNAME statements
that reference data library metadata definitions.

54

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-29

The Metadata LIBNAME Engine


The metadata LIBNAME engine uses metadata access
controls to determine access to libraries and tables.

libname orstar meta library='Orion Star Library';

55

The authorization permissions that you specify for a data library in SAS Management Console
are enforced only for library assignments that use the metadata LIBNAME engine.

Details of the Metadata LIBNAME Engine


SASLibrary metadata objects define the underlying
SAS engine and options that are necessary to process
the data library and its members.
The metadata LIBNAME engine retrieves information
about the target SAS library from the SASLibrary
metadata object.
A LIBNAME statement is constructed using the
underlying engine and options.
When your program processes the data, the
underlying engine is used, subject to the data-level
permissions specified in the metadata.

56

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-30 Chapter 5 Creating Stored Processes

5.03 Multiple Answer Poll


Which of the following are true about using the LIBNAME
statement in a stored process program?
a. The metadata engine ensures that metadata security
is enforced.
b. The metadata engine is required.
c. The metadata engine removes physical path
information from stored process programs.

58

Metadata LIBNAME Engine: Syntax


General form of the LIBNAME statement using the
metadata LIBNAME engine:

LIBNAME libref META


LIBRARY="</folder-pathname/>name"
<connection-options> <engine-options>;

The LIBRARY= option must specify the value of the


Name attribute from the SASLibrary metadata object.
The value folder-pathname is optional.
libname orstar meta library='Orion Star Library';

libname orstar meta library=


'/Orion Star/Marketing Department/Data/Orion Star Library';

60

When you specify folder-pathname in the LIBRARY= option, the quotation marks
and leading forward slash (/) are required.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-31

Creating a Stored Process


SAS Enterprise Guide provides a wizard interface
to create a stored process program and register the
metadata.
There are several ways to provide the SAS program code
to the wizard, including the following:
Using the code generated by SAS Enterprise Guide
for a single task or all of the tasks in a process flow
Using existing code that was written through
SAS Enterprise Guide or another SAS programming
interface
Typing the code directly into the wizard

61

Creating a Stored Process from a Process Flow


Stored processes can be created from a single task
or all of the tasks in a process flow.
For a single task, right-click the task and select
Create Stored Process.
For all of the tasks in a process flow, right-click in the
background of the Process Flow window and select
Create Stored Process.

62

Stored processes can also be created by using existing SAS program code or typing new
SAS program code into the Create New Stored Process Wizard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-32 Chapter 5 Creating Stored Processes

Create New SAS Stored Process Wizard Steps


When you create a stored process from a single task or
all of the tasks in a project, the Create New SAS Stored
Process Wizard has seven steps.
1. Name and description
2. Code options/SAS code
3. Execution options
4. Library references (librefs)
5. Prompts
6. Data sources and targets
7. Summary

63

Creating from a Single Task


In Step 1 of the Stored
Process Wizard, you
type the name and other
descriptive information
in the Create New SAS
Stored Process Wizard.
You can preview the
code that will be used
for the stored process
by clicking (the Code
Preview icon).

64

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-33

Creating from a Single Task


After you type the
descriptive
information, Step 2
is where SAS
Enterprise Guide
offers to add the
stored process
macros, global
macro variables, and
LIBNAME statement
information for you.

65

Creating from All the Tasks


When you create a
stored process from
all of the tasks in a
project, the SAS
code from all of the
tasks is displayed in
Step 2. To specify
which options to
include, select the
Include code for
drop-down box.

66

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-34 Chapter 5 Creating Stored Processes

5.04 Quiz
What is the icon
used for in the Create
New SAS Stored
Process Wizard?
a. Opens the
Metadata
Editor window
b. Opens the Code
Preview window
c. Runs the stored
process
d. Saves the SAS
code
68

Create from a Partial Process Flow


There is an extra step if you have a process flow with
multiple tasks and you want to create a stored process
from more than one of the tasks but not all.
Export the SAS code for the tasks that you want to
create a stored process from.
Create a new stored process using the exported code.

To export the code in a project, select


File Export Export All Code In Project.

70

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-35

Creating New Stored Processes Using SAS Enterprise Guide

This demonstration illustrates how to create stored processes from the tasks in a SAS Enterprise Guide
project.
1. Select Start All Programs SAS SAS Enterprise Guide 4.3 to invoke SAS Enterprise Guide.
2. If necessary, change the connection profile to use Erics credentials.
3. Select More projects from the Welcome window.
4. Select My Computer on the left side of the Open Project window.
5. Navigate to S: Workshop SP.
6. Select SP Customer Order Information.egp.
7. Click Open.

If a message window appears and asks you to change your current profile, click No.
The SP Customer Order Information project appears.

8. Select Run Run Process Flow to run the project and view the output of the three tasks.
9. Click to close the results and display the Process Flow window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-36 Chapter 5 Creating Stored Processes

Creating a Stored Process from the Summary Tables Task

1. Right-click Summary Tables in either the Project Tree or the Process Flow window, and select
Create Stored Process.

In order to create a stored process from this one task only, make sure that you select
Create Stored Process by right-clicking on the task, not by right-clicking in the Process
Flow window and not by selecting New Stored Process.
The Create New SAS Stored Process Wizard window appears. In Step 1 of the wizard, you specify
the stored process name and descriptive information, including the metadata folder where it will be
stored.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-37

2. Type SP Retail Price Analysis by Year and Country in the Name field.
3. Click Browse to select the metadata folder in which to store the new stored process.
4. Select SAS Folders in the left side of the window.
5. Double-click Orion Star Marketing Department Stored Processes.
6. Click Save to save the location and return to Step 1 of the wizard.
The updated fields should resemble the following:

7. Click Next.
Step 2 of the wizard is where you specify whether you want SAS Enterprise Guide to include the
code for the stored process macros, global macro variables (if any), and LIBNAME references. This
code is added to the SAS code from the selected task to create the stored process program.
8. Verify that all three check boxes are selected.

9. Click Next.
Step 3 is where you specify the stored process execution options, including the server, source filepath,
and filename, as well as the output options.
10. Select SASApp - Logical Stored Process Server as the value for the Execution server field.
11. Select S:\Workshop\SP as the value for the Source filepath field.
If the source filepath is not set to S:\Workshop\SP, then click the downward-pointing arrow or
(the File Folder icon) to select the source filepath.

Use SAS Management Console to register source filepaths in the metadata.

The list of files on the target server in the display above might be different from what is
displayed on your classroom machine.

The value in the Source filename field is determined by the stored process name.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-38 Chapter 5 Creating Stored Processes

12. On the lower portion of the Step 3 window, clear the Streaming check box if it is checked. Only the
Package check box should be selected in the SAS Result Types area.
The updated fields should resemble the following:

13. Click Next.


Step 4 contains the LIBNAME statement information.

The LIBID= option uses the unique identifier assigned to the library in the metadata. You do
not have to know this identifier. If you supply your own LIBNAME statement, you can use
the librarys descriptive name with the LIBRARY= option.
14. Accept the default values and click Next. In Step 5, you specify prompt information that is used as
parameters for the stored process.
15. This stored process does not use parameters, so click Next.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-39

Step 6 is a summary of the information entered into the wizard.

16. Verify that the Run stored process when finished check box is selected.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-40 Chapter 5 Creating Stored Processes

17. Click Finish.


The Create New SAS Stored Process Wizard does the following:
Creates the stored process program and stores it in the location specified in Step 3
Registers the stored process in metadata using the SAS Folders location specified in Step 1
Adds the new stored process to the current SAS Enterprise Guide project
If the Run stored process when finished check box is selected in Step 6, the stored process is
executed and the output is displayed.

Because the stored process was created from the task, the output matches the output of
the task.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-41

18. Click to close the results and display the Process Flow window.

The stored process and its results are included as part of the process flow.

Creating a Stored Process from All of the Tasks in the Project

1. Right-click in the background of the Process Flow window and select Create Stored Process.

In order to create a stored process from all of the tasks in the project, select Create Stored
Process by right-clicking in the background of the Process Flow window. Do not right-click
any of the items in the Process Flow window, and do not select New Stored Process.
2. Click OK to close the warning window.

The current project now includes the stored process that you created. A stored process cannot
be part of another stored process definition.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-42 Chapter 5 Creating Stored Processes

3. Type SP Customer Order Analysis by Country in the Name field.

The Create New SAS Stored Process Wizard remembers selected values from the last time it
was run.
4. Click Next to move to Step 2.
Step 2 contains the SAS code from all of the tasks in the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-43

5. No changes are needed in the SAS code. Click Next to move to Step 3. Verify that the execution
server, source filepath, and source filename are the same as shown below.
6. Clear the Streaming check box.

The Create New SAS Stored Process Wizard remembers the execution options. The name of
the SAS code file is updated to match the new stored process name.
7. Click Next to move to Step 4.
8. Accept the default values in Step 4, and click Next to move to Step 5.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-44 Chapter 5 Creating Stored Processes

9. This stored process does not use parameters, so click Next to move to Step 6.
10. Click Finish.
As before, the stored process program is created, registered in metadata, and added to the project.
The output from running the stored process is displayed.

11. Use the scroll bar to verify that the output from all three tasks was created.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.2 Creating a Stored Process from a SAS Enterprise Guide Project 5-45

12. Click to close the results and display the Process Flow window.

Saving the Project and Closing SAS Enterprise Guide

1. Select File Save SP Customer Order Information As.


2. Navigate to S:\ Workshop sbaft43.
3. Type FT Customer Order Information in the File name field.
4. Click Save.
5. Select File Exit.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-46 Chapter 5 Creating Stored Processes

Exercises

2. Creating a Stored Process


As Ellen, create a stored process from all of the tasks in the Supplier Delivery Report project. When
you initially open the project, the tasks Process Flow window resembles the following:

a. Open SAS Enterprise Guide. If necessary, change the connection profile to use Ellen. Open the
Supplier Delivery Report project from the S:\Workshop\SP directory and run all the tasks to
refresh the project.
Hint: Close the results to display the Process Flow window.
b. Create a stored process from all of the tasks in the project.
Hint: Right-click in the background of the Process Flow window and select Create Stored
Process.
Name the stored process SP Supplier Delivery Report.
Store the new stored process in the Orion Star Sales Department Stored Processes folder.
Select SASApp - Logical Stored Process Server as the value for the Execution server field.
Select S:\Workshop\SP as the value for the Source file path field.
Select Package as the only output option selection.
c. Save the SAS Enterprise Guide project with the name FT Supplier Delivery Report in the
S:\Workshop\sbaft43 location.
d. Close SAS Enterprise Guide.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.3 Creating a Stored Process from a SAS Program 5-47

5.3 Creating a Stored Process from a SAS Program

Objectives
Define the Create New SAS Stored Process Wizard
steps when you create a stored process from
SAS code in SAS Enterprise Guide.
Create a stored process from existing SAS code in
SAS Enterprise Guide.

75

Creating a Stored Process (Review)


SAS Enterprise Guide provides a wizard interface
to create a stored process program and register the
metadata.
There are several ways to provide the SAS program code
to the wizard, including the following:
Using the code generated by SAS Enterprise Guide
for a single task or all of the tasks in a process flow
Using existing code that was written through
SAS Enterprise Guide or another SAS programming
interface
Typing the code directly into the wizard

76

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-48 Chapter 5 Creating Stored Processes

Create a Stored Process from SAS Code


Stored processes can be created from SAS program code
by either typing the code directly into the wizard or by
loading an existing SAS program file.
To create a stored process using code, select
File New Stored Process.

77

Create New SAS Stored Process Wizard


When you create a stored process by selecting
File New Stored Process, the Create New
SAS Stored Process Wizard has six steps.
1. Name and description
2. Code options/SAS code
3. Execution options
4. Prompts
5. Data sources
6. Summary

78

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.3 Creating a Stored Process from a SAS Program 5-49

Create a Stored Process from SAS Code


The Create New SAS
Stored Process Wizard
window appears. You
type the stored
process name and
descriptive information
in Step 1.

79

Create a Stored Process from SAS Code


In Step 2, you type the
SAS code or tell
SAS Enterprise Guide
where to load the
code from.

80

When you select Include code for, you tell SAS Enterprise Guide whether to insert code
elements such as stored process macros, global macro variables, or a LIBNAME statement.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-50 Chapter 5 Creating Stored Processes

Create New SAS Stored Process Wizard


The Create New
SAS Stored Process
Wizard has six steps.
The missing step is the
one with the library
reference
specifications.

81

The SAS code that you specify in the wizard must include a LIBNAME statement, or the library
reference specification must be available to the execution server by another means, such as a
predefined library.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.3 Creating a Stored Process from a SAS Program 5-51

Creating a Stored Process from Existing SAS Program Code

This demonstration illustrates how to use SAS Enterprise Guide to create stored processes from existing
SAS program code.
LIBNAME OSDM META LIBRARY="Orion Star Reporting Library";

PROC GCHART DATA=OSDM.CUSTORDERS;


PIE Supplier_Country / SUMVAR=Total_Retail_Price TYPE=SUM
NOLEGEND SLICE=OUTSIDE PERCENT=OUTSIDE
VALUE=NONE OTHER=2 OTHERLABEL="Other"
COUTLINE=BLACK NOHEADING;
TITLE1 "Order Retail by Supplier Country";
RUN;

PROC TABULATE DATA=OSDM.CUSTORDERS


FORMAT=COMMA9.;
VAR Quantity;
CLASS Year_ID / ORDER=UNFORMATTED MISSING;
CLASS Supplier_Country / ORDER=UNFORMATTED MISSING;
TABLE Supplier_Country ALL='Total (ALL)',
Year_ID*Quantity=''*N='' ALL='Total (ALL)'*Quantity=''*N='';
TITLE1 "Order Quantity Summary by Supplier Country";
RUN;
1. Select Start All Programs SAS SAS Enterprise Guide 4.3 to invoke SAS Enterprise Guide.
2. Select New Project from the Welcome window.
3. If necessary, change the connection profile to use Erics credentials.
4. Select File New Stored Process. The Create New SAS Stored Process Wizard window appears.
5. Type SP Supplier Analysis in the Name field.
6. If necessary, click Browse and change the value of the Location field to Orion Star Marketing
Department Stored Processes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-52 Chapter 5 Creating Stored Processes

7. Click Next to move to Step 2.


8. Click Replace with code From My Computer.
9. Navigate to My Computer S: Workshop SP.
10. Select SPSupplierSummary Open.
The SAS code is returned to Step 2 of the wizard.

The code includes a LIBNAME statement that uses the metadata LIBNAME engine.

11. Click Next to move to Step 3.


12. Verify that SASApp - Logical Stored Process Server is selected as the execution server.
13. Verify that S:\Workshop\SP is selected as the source filepath.
14. Accept all other defaults and click Next to move to Step 4.
15. There are no prompts for this stored process. Click Next to move to Step 5.
16. No data source or target is required. Click Next to move to Step 6.
17. Verify that Run stored process when finished is selected and then click Finish.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.3 Creating a Stored Process from a SAS Program 5-53

The stored process program is created, registered in metadata, and added to the project. The output
from running the stored process is displayed.

18. Use the scroll bar to verify that the stored process created a crosstabular report as well as the bar
chart.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-54 Chapter 5 Creating Stored Processes

19. Click to close the results and display the Process Flow window.

Closing SAS Enterprise Guide without Saving the Project

1. Select File Exit.


2. Click No when you are asked to save the project.

Although you do not save the project, the stored process is created and registered in metadata,
and the stored process program is saved to the operating system.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.3 Creating a Stored Process from a SAS Program 5-55

Exercises

3. Creating a Stored Process from a SAS Program


As Ellen, create a stored process from a SAS program to provide a report for a selected supplier,
Van Dammeren International.

a. Create a new project in SAS Enterprise Guide. If necessary, change the connection profile to use
Ellens credentials.
b. Create a new stored process in SAS Enterprise Guide, and in Step 1 of the Stored Process Wizard,
name the stored process SP Van Dammeren Feedback.
c. In Step 2 of the Stored Process Wizard, use the code from the SP Supplier Feedback.sas program
for the stored process. This program is stored in the S:\Workshop\SP folder. Save the new stored
process in the Orion Star Sales Department Stored Process folder.
Hint: Use the Replace with code button in Step 2 to use the existing program for the stored
process. The program already has the logic to select Van Dammeren International.
d. Accept all the defaults for the remaining steps in the Stored Process Wizard. Run the stored
process and review the results.
e. Close SAS Enterprise Guide without saving the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-56 Chapter 5 Creating Stored Processes

5.4 Creating Stored Process Parameters

Objectives
Describe how stored processes use the prompting
framework to enable passing user values to the stored
process program code.
Explore the macro variables created for each prompt
type.
Describe how the SAS macro language is used
with stored processes.
Explore how to use the prompting framework
in SAS Enterprise Guide.
List the types of stored process prompts.
Describe how to populate prompt values.

86

Prompt Macro Variables


Stored process parameters use the prompting framework
to enable users to provide values to the stored process
program.
The prompting framework automatically generates one or
more global macro variables for each prompt when the
prompt is executed at run time.
The type of prompt determines which macro variables are
generated.

87 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-57

Prompt Macro Variables


A base macro variable is generated for every type of
prompt except range prompts. The name of the prompt
becomes the name of the base macro variable.

Example: A stored process has a prompt named Country.

When the user selects a value, the COUNTRY


macro variable is created and populated.
COUNTRY=Belgium

88

Understanding Prompts and Macro Variables


The stored process consumer sees a prompt designed
with the prompting framework. The server that executes
the stored process sends the prompt to your program as a
macro variable.
Stored Process
Server
or COUNTRY=Belgium
Workspace
Server Macro variable created
Prompt with value

title "Orders by &COUNTRY";


where order_country = "&COUNTRY";
newvar = "&COUNTRY";
Examples of usage in stored process program
89

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-58 Chapter 5 Creating Stored Processes

5.05 Poll
A base macro variable is generated for every type
of prompt.
True
False

91

Stored Process Prompt Considerations


When you use stored process prompts, there are several
considerations to remember, including the following:
SAS macro variable names can be no more than
32 characters in length.
Because the automatic macro variables that are
created for prompts append characters to the prompt
name, it is a best practice to limit prompt names to 20
characters. (The longest possible suffix is 12
characters.)
When you add a prompt, you might also need to
modify the stored process program code to correctly
handle the value returned by the prompt.

93

The SAS 9.2 Stored Processes: Developers Guide


(support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/titlepage.htm) provides
more information about the macro variables created for stored process parameters.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-59

Parameter Constraints
Parameter values can be limited by constraints that are
specified by an enumerated list or a range of valid values.

Constraints are not fully supported for custom


Web applications. If it is important that the stored
process honor specified constraints, the stored
process program must contain logic to prevent
invalid values.

94

Interacting with a Stored Process Program


There might be instances when you want to enable the
user of a stored process to pass values to the stored
process program code.
Prompts (or parameters) can be added to a stored
process to enable the user to supply information for
program processing, such as the following:
The data to report on

The variables to use in analysis

The subset of data to display

The report style and attributes

95

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-60 Chapter 5 Creating Stored Processes

5.06 Poll
Have you used the SAS macro facility?
Yes
No

97

The SAS Program


Traditional SAS programs use macro variables to enable
dynamic results to be generated by changing the macro
variable values.
libname orion "S:\Workshop";
%let year=2010;
title "Customer Summary by Country";
proc means data=orion.customer_orders
mean min max median;
var quantity;
class customer_country;
where year = &year;
run;
title "Customer/Product Orders";
proc print data=orion.customer_orders noobs label;
var customer_name product_name
total_retail_price;
where year = &year;
run;

98

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-61

Converting Macro Variables to Parameters


It is easy to convert macro variables in SAS programs
to stored process parameters by doing the following:
Identify the macro variable name in the current
SAS program. where year = &year;
Create a prompt with the same name.

The prompt value becomes the macro variable


parameter used by your program.

Remove any statements from the SAS program that


set the macro variable value. %let year = 2003;

99

Modifying the SAS Program


Use the %GLOBAL statement to identify macro variables
from the original program. The macro variables will be
used as stored process input parameters.
Because the values for the input parameters come from
the client application, remove any %LET statements from
the stored process program.

100

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-62 Chapter 5 Creating Stored Processes

Modifying the SAS Program


The Create New SAS Stored Process Wizard can add the
%GLOBAL statement for you, but it does not remove any
%LET statements.

%global year quarter month;

101

It is a best practice to begin all stored processes (regardless of the server type) with %GLOBAL
declarations for all of your input parameters. The %GLOBAL declarations create an empty macro
variable for each possible input parameter. They enable you to reference the macro variable in the stored
process program even if it was not set by the stored process client application. If you do not declare input
parameters in a %GLOBAL statement, then any references to an unset input parameter result in warning
messages in the SAS log.

A %LET statement in the SAS code overrides the parameter value from the prompting
framework.

Setup for the Poll


The following is part of the SAS code for a stored
process: %global year quarter month;

%let year=2009;
%let quarter=1;
%let month=1;

These are the prompt


values specified when
the stored process
was run:

103

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-63

5.07 Multiple Choice Poll


In the example on the previous slide, what happens if the
%LET statements are not removed from the SAS code?
a. The stored process does not run and creates an error.
b. The stored process runs and creates results for
May 2010.
c. The stored process runs and creates results for
January 2009.
d. The stored process cannot be selected because
it is incomplete.

104

Adding Prompts to Stored Processes


In SAS Enterprise Guide, the Create New SAS Stored
Process Wizard and the Stored Process Manager enable
you to add and edit stored process prompts.

106

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-64 Chapter 5 Creating Stored Processes

Adding Prompts to Stored Processes


When you choose to add a prompt to a stored process,
you have several options, including the following:
Add a new empty
prompt
Add a prompt based
on one or more
macro variables
from the SAS code
Copy a prompt from the SAS Enterprise Guide project

Add a new prompt group


Add a shared prompt

107

Adding a New Prompt


When you select New Prompt, the
Add New Prompt window appears with default values
for the required fields.
If you create a new
prompt from a macro
variable in the SAS
code, the macro
variable name is
used as the default
value for both the
Name and
Displayed text fields.

108

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-65

Add New Prompt: General Tab


The General tab enables you to specify the following:
Name

Displayed text

Description

Parent group
Options

Stored process prompt names must be valid


109
SAS names.

5.08 Quiz
Which of the following are valid SAS names?
a. Number of Orders
b. Number_of_Orders
c. #ofOrders
d. 2010HolidayOrders

111

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-66 Chapter 5 Creating Stored Processes

Add New Prompt: Prompt Type and Values Tab


The Prompt Type and Values tab enables you to specify
the following:
Prompt type

Attributes for
the selected
prompt type

113

Type of Stored Process Prompts


The following are valid stored process prompt types:
Text and text range

Hyperlink

Numeric and numeric range

Date and date range


Time and time range

Timestamp and timestamp range

Data source

Data source item

File or directory
Color

Data library

Variable
114

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-67

Populating Prompt Values


When you create stored process prompts that are text,
numeric, or date types, you can choose from several
methods for populating the prompt values:

115

User Enters Values


When User enters values is selected as the method
to populate the prompt, the user types the value(s)
when the stored process is run.

116

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-68 Chapter 5 Creating Stored Processes

User Selects Values from a Static List


When User selects
values from a static
list is selected as the
method to populate
the prompt, the user
selects from a fixed
set of values that are
defined when you
create the prompt.

117 continued...

User Selects Values from a Static List


A static list of values can
be entered manually. You
can also click Get Values,
which accesses a new
window where you can
select a table to populate
the static list of values.

118

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-69

User Selects Values from a Dynamic List


When User selects values from a dynamic list
is selected as the
prompt method, the
user selects from a
list of unique values
that is created from a
data source when the
stored process is run.

119

5.09 Quiz
Match the method for populating
prompts to the value being
prompted.

A. User selects an order 1. User types values.


type from a list that is
2. User selects values
always 1, 2, or 3.
from a static list.
B. User selects text for
the report title. 3. User selects values
from a dynamic list.
C. User selects a customer
ID, which can change
over time.

121

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-70 Chapter 5 Creating Stored Processes

Add New Prompt: Dependencies Tab


The Dependencies tab enables you to specify
dependencies between prompts. A dependency occurs
when the values for one prompt depend on the value that
was selected for another prompt.
Dependencies can
be created for text,
numeric, and date
prompts when the
user enters a value
from a dynamic list.

123

Adding a New Prompt Group


When you select New New Group, the New Group
window appears with default values for the required fields.

Valid group types are


standard group
transparent group

selection group.

124

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-71

Creating a Stored Process with a Prompt to Filter Data

This demonstration illustrates how to add a prompted query in SAS Enterprise Guide to filter data. You
then create a new stored process from the project.
1. Select Start All Programs SAS SAS Enterprise Guide 4.3.
2. If necessary, change the connection profile to use Erics credentials.
3. Open the SP Customer Order Information project from S:\Workshop\SP\.

4. Select File Save SP Customer Order Information As.


5. Navigate to S: Workshop sbaft43.
6. Type FT Customer Order Information by Order Type in the File name field.
7. Click Save.
8. Add the Query Builder task to filter the data from the CustOrders table.
a. Right-click CustOrders and select Query Builder. The Query Builder window appears.
b. Type Filter by Order Type in the Query name field.
c. Double-click the following columns to move them to the Select Data tab:
CostPrice_Per_Unit
Customer_Country
Order_Type
Total_Retail_Price
Year_ID

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-72 Chapter 5 Creating Stored Processes

The Query Window Builder should resemble the following:

d. Click Prompt Manager to build a new prompt to use in the filter. The Prompt Manager window
appears.

The Prompt Manager enables you to build SAS Enterprise Guide prompts. These prompts
can also be used as part of a stored process.
1) Click Add.
2) Type SelectOrderType in the Name field.

SAS Enterprise Guide prompt names must be valid SAS names. Valid SAS names are
1 to 32 characters in length; contain letters, numbers, or underscores; and cannot start
with a number.
3) Type Select an order type in the Displayed text field.
4) Click the Requires a non-blank value check box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-73

5) Click the Prompt Type and Values tab.


6) Select Numeric as the value for the Prompt type field.
7) Select User selects values from a static list as the value for the Method for populating
prompt field.
8) Verify that Single value is selected as the value for the Number of values field.

9) Click Get Values. The Get Values window appears.


10) Click Browse to select your data source.
11) Click Project from the selection pane on the left.
12) Select Details to change the view.

13) Select the table with the CustOrders label.


14) Click Open.
15) Select Order_Type as the value in the Column field.
16) Click Get values.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-74 Chapter 5 Creating Stored Processes

17) Click to copy all of the values to the Selected values list box. After all the selections are
copied, the Get Values window should resemble the following:

Because the underlying data source has a permanent user-defined format associated
with the variable, the formatted values are displayed to the user of the prompt. The
prompting framework provides the unformatted values to the macro variable when
the variable is used as a stored process parameter.
18) Click OK to close the Get Values window.
19) Click the radio button to set the default value to Catalog Sale.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-75

20) Click OK to close the Add New Prompt window.


21) Click Close to close the Prompt Manager window.
e. Create a filter to subset the data.
1) Click the Filter Data tab.

2) Click (the Filter icon) on the Filter Data tab to create a new filter.

3) Verify that Basic Filter is selected.


4) Click Next.
5) Select Order_Type in the Select Data Columns list.
6) Click Next.
7) Verify that Equal to is selected as the value for the Operator field.

8) Click next to the Value field.

9) Click the Prompts tab.


10) Select &SelectOrderType.

11) Click Next.


12) Click Finish.
f. Click Run.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-76 Chapter 5 Creating Stored Processes

The Specify Values for Project Prompts window appears.

g. Accept the default value and click Run.


The first 10 rows of output should resemble the following:

h. Click to close the results of the query.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-77

The Process Flow window should resemble the following:

9. Redefine the input data used for the One-Way Frequencies, Bar-Line Chart, and Summary Tables
tasks.
a. Right-click One-Way Frequencies and select Select Input Data
1 QUERY_FOR_CUSTORDERS.
b. Right-click Bar-Line Chart and select Select Input Data
1 QUERY_FOR_CUSTORDERS.
c. Right-click Summary Tables and select Select Input Data
1 QUERY_FOR_CUSTORDERS.
The Process Flow window should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-78 Chapter 5 Creating Stored Processes

10. Create a new stored process from all of the tasks in the project.
a. Right-click in the background of the Process Flow window and select Create Stored Process.
b. Type SP Customer Analysis by Order Type in the Name field.
c. Click Browse to change the value of the Location field to Orion Star
Marketing Department Stored Processes.
d. Click Next to move to Step 2.
e. In the SAS Code window, scroll to the PROC SQL step. The WHERE clause is used to filter the
data based on the value of the prompt.

f. Click Next to move to Step 3.


g. Accept the defaults for Step 3 and click Next to move to Step 4.
h. Accept the defaults for Step 4 and click Next to move to Step 5.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-79

Step 5 shows that the prompt used in the Query Builder task is automatically included as part of
the stored process.

i. Click Next to move to Step 6. There are no data sources or targets. Click Next to move to Step 7.
j. Verify that Run stored process when finished is selected.
k. Select Finish.

The stored process is registered in metadata and added to the project. The stored process runs, and
the Specify Values for Project Prompts window appears.
l. Accept the default value and click Run.
m. Scroll through the results to verify that output from all three tasks is included.
n. Click to close the results of the stored process.

11. Save the project by selecting File Save FT Customer Order Information by Order Type.
12. Select File Exit to close SAS Enterprise Guide.
13. Click OK when you are prompted about closing a project with temporary data.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-80 Chapter 5 Creating Stored Processes

Running the New Stored Process in Microsoft Word

1. Select Start All Programs Microsoft Office Microsoft Word 2010.


2. Click the SAS tab from the Microsoft Word ribbon.
You should be connected as Eric. If not, perform these actions to modify the profile:
Select Tools Connections to open the Connections window.
Verify that the My Server profile is selected and click Modify.
Type Eric in the User field and type the password provided by your instructor.
Click Save.
Click Yes if you are prompted to continue with the changes.
Click Close to close the Connections window.
3. Change the default style used for the SAS output.
a. Click Tools Options from the SAS tab.
b. Click the Results tab.
c. Select Apply Style.
d. Select Ocean.
e. Click OK.
4. Click Reports.
5. Select SAS Folders Orion Star Marketing Department Stored Processes.
6. Select SP Customer Analysis by Order Type Open.
7. Accept the default value and click Run.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-81

8. Scroll to the top of the Word document and verify that output from all three tasks is displayed. Partial
results from each step should resemble the following:
Summary Tables Output

Bar-Line Chart Output

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-82 Chapter 5 Creating Stored Processes

One-Way Frequencies Output

9. Click File Exit to close Microsoft Word. (Do not save the changes.)
10. Click Dont Save when you are prompted to save changes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.4 Creating Stored Process Parameters 5-83

Exercises

4. Creating a Stored Process to Include Additional Prompt Attributes and a Footnote


As Ellen, create a new stored process to include additional prompt attributes and a footnote that
indicates which application was used to request the stored process.
a. Open a new SAS Enterprise Guide project. If necessary, change the connection profile to use
Ellens credentials.
b. Create a new stored process named SP Supplier Prompt.
The stored process runs on the SASApp - Logical Stored Process Server and is stored in the
Orion Star Sales Department Stored Processes location.
Create the stored process with a result type of Package.
c. In Step 2, include the code from S:\Workshop\SP\SP Supplier Feedback.sas.
d. Make the following modifications to the code:
Delete the %LET statement at the top of the code. The %LET statement sets a permanent value
for the WANT macro variable and it appears immediately after the LIBNAME statement.
In the PROC GCHART step, use the footnote to display information about where the stored
process was run.
Hint: Change the null FOOTNOTE statement immediately under the TITLE1 statement. Use the
SAS SCAN function to extract the first word and use a semicolon as a delimiter. The
complete footnote string should be as follows:
Run from: %sysfunc(scan(&_client,1,';'))
e. Add a prompt to the stored process and set a default for the prompt value.
Create a required prompt with displayed text of Select a Supplier prompt. Use the macro
variable WANT as the name of the input prompt.
Enable the user to select a single value for the prompt from a dynamic list based on the
Supplier_Name column in the SUPPLIERSALES table stored in the Orion Star
Sales Department Data location.
Set a default value for the prompt to Van Dammeren International.
Run it and use the default values.
Reset the prompts and run the stored process a second time using the value of Twain Inc
for the stored process.
Hint: Right-click on the stored process name and select Reset Prompts from the pop-up menu.
f. Close SAS Enterprise Guide without saving the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-84 Chapter 5 Creating Stored Processes

5.5 Creating Advanced Prompts

Objectives
Implement cascading prompts for stored process
parameters.
List the three types of prompt groups.
Describe the steps to define selection groups.

129

Advanced Prompting Capabilities


In addition to using prompts from a SAS Enterprise Guide
project, other prompting capabilities are available for
stored processes, including the following:
Cascading prompts

Prompt groups

Conditional prompt execution

Shared prompts

130 ...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-85

Advanced Prompting Capabilities


In addition to using prompts from a SAS Enterprise Guide
project, other prompting capabilities are available for
stored processes, including the following:
Cascading prompts

Prompt groups

Conditional prompt execution

Shared prompts

131

Using Multiple Parameters


Many stored processes require more than one parameter.
The following relationships between parameters might be
present:
All parameters can be chosen independently.

Valid values for a parameter depend on the selection


for other parameters.
When the appropriate values for one parameter depend
on the selection made for another parameter, you can
define cascading prompts.

132

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-86 Chapter 5 Creating Stored Processes

Cascading Prompts (Review)


Cascading prompts populate prompt values based on
selections in other prompts.
Example: When a department is selected, the list of
sections is dynamically generated based
on the selected department.

133

Defining Dependencies
The dependencies that create cascading prompts are
defined in the prompt that depends on another prompt
for its values.

In order for a prompt to be dependent on another prompt,


the prompt must meet these requirements:
The prompt type must be text, numeric, or date.

The values for the dependent prompt must be defined


using a dynamic list.
134

Although the values for the dependent prompt must be populated using a dynamic list, the first
prompt (or initial prompt) does not necessarily need to be dynamic. For example, the first prompt
could ask the user to select from one of three possible order types. Then the second (or
dependent) prompt could present the user with a dynamic list of products for only the selected
order type. There would be no need for the first prompt to be a dynamic prompt, given that the
values for order type are not likely to change.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-87

Creating a Stored Process with Cascading Prompts

This demonstration illustrates how to create a stored process that includes cascading prompts.
1. Select Start All Programs SAS SAS Enterprise Guide 4.3.
2. Select New Project in the Welcome to SAS Enterprise Guide window.
3. If necessary, change the connection profile to use Erics credentials.
4. Create a new stored process from an existing SAS program.
LIBNAME sales meta library="Sales Analysis Library";
AXIS1 STYLE=1 WIDTH=1;
AXIS2 STYLE=1 WIDTH=1 MINOR=NONE;
TITLE1 "Total Sales by Year";
TITLE2 "Product Category: &category";
TITLE3 "Product Subcategory: &subcategory";
PROC GCHART DATA=sales.sales_analysis;
HBAR3D Year / SUMVAR=TotalSales
SHAPE=CYLINDER
FRAME
DISCRETE
TYPE=SUM
SUM
NOLEGEND
COUTLINE=BLACK
MAXIS=AXIS1
RAXIS=AXIS2
PATTERNID=MIDPOINT;
FORMAT TotalSales DOLLAR14.;
WHERE ProductCategory="&category" and
ProductSubcategory="&subcategory" and
Year between &year_min and &year_max;
RUN;
QUIT;
a. Select File New Stored Process.
b. Type SP Sales by Year in the Name field.
c. Click Browse and select Orion Star Marketing Department Stored Processes as the
value for the Location field.
d. Click Next to move to Step 2.
e. Click Replace with code and select From My Computer.
f. Navigate to S: Workshop SP.
g. Double-click SPTotalSalesbyYear.sas.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-88 Chapter 5 Creating Stored Processes

h. Click Next to move to Step 3.


i. Verify the execution options and click Next to move to Step 4.

j. Create prompts using the macro variables in the program.


1) Click New Prompt from SAS Code for Multiple.
The Edit Prompt window appears with the name of the first macro variable from the
SAS code as the values of both the Name and Displayed text fields.

2) Type Select a category in the Displayed text field.


3) Click the Requires a non-blank value check box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-89

4) Click the Prompt Type and Values tab.


5) Verify that Text is selected as the value for the Prompt type field.
6) Select Users selects values from a dynamic list as the value for the Method for populating
prompt field.
7) Verify that Single Value is selected as the value for the Number of values field.
8) Click Browse next to the Data source field.
9) Navigate to Orion Star Marketing Department Data.
10) Double-click SALES_ANALYSIS.
11) Select ProductCategory as the value for the Column field.
12) Click OK.
A second Edit Prompt window appears for the subcategory macro variable.
13) Type Select a subcategory in the Displayed text field.
14) Click the Requires a non-blank value check box.
15) Click the Prompt Type and Values tab.
16) Verify that Text is selected as the value for the Prompt type field.
17) Select Users selects values from a dynamic list as the value for the Method for populating
prompt field.
18) Verify that Single Value is selected as the value for the Number of values field.
19) Click Browse next to the Data source field.
20) Double-click SALES_ANALYSIS.
21) Select ProductSubcategory as the value for the Column field.
22) Click the Dependencies tab.
23) Click Add to add a dependency for the Subcategory prompt.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-90 Chapter 5 Creating Stored Processes

24) Verify that Select a category is selected as the value for the Prompt field.
25) Verify that ProductCategory is selected as the value for the Column field.
26) Select Equal as the value for the Operator field.

27) Click OK.


A third Edit Prompt window appears for the YEAR_MIN macro variable. You use this
prompt to provide the user a single prompt that enables him or her to select a range of years.
28) Type year in the Name field.
29) Type Select a range of years in the Displayed text field.
30) Click the Requires a non-blank value check box.
31) Click the Prompt Type and Values tab.
32) Select Numeric Range as the value for the Prompt type field.
33) Click the Allow only integer values check box.
34) Type 2001 in the Minimum value allowed field.
35) Type 2008 in the Maximum value allowed field.
36) Click OK.
A fourth Edit Prompt window appears for the YEAR_MAX macro variable. Because you
created the previous prompt to handle the range of years, you do not need an additional
prompt value.
37) Click Skip. The completed prompts should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-91

k. Click Next to move to Step 5.


l. There are no data sources or targets require. Click Next to move to Step 6.
m. Verify the summary information. Also verify that Run stored process when finished is selected
and then click Finish.
5. Type values for the prompts.
a. When the prompt window appears, notice that you are not able to select a subcategory. First you
must specify a category.

b. Select Clothing as the value for the Select a category prompt.


c. Select Mens as the value for the Select a subcategory prompt.
d. Type 2005 in the From field in the Select a year prompt.
e. Type 2008 in the To field in the Select a year prompt.
The completed Specify Values for SP Sales by Year window should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-92 Chapter 5 Creating Stored Processes

f. Click Run.

6. Save the project.


a. Select File Save Project As.
b. Navigate to S: Workshop sbaft43.
c. Type FT Sales by Year in the File name field.
d. Click Save.

Do not exit SAS Enterprise Guide.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-93

Advanced Prompting Capabilities (Review)


In addition to using prompts from a SAS Enterprise Guide
project, other prompting capabilities are available for
stored processes, including the following:
Cascading prompts

Prompt groups

Conditional prompt execution

Shared prompts

136

Prompt Groups
Prompt groups can be used to organize multiple prompts
and control the conditional execution of prompts.
There are three types of prompt groups:
Standard group

Transparent group

Selection group

137

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-94 Chapter 5 Creating Stored Processes

Standard and Transparent Groups


The main difference between standard and transparent
groups is whether the group navigation and headers
are displayed or hidden. Both standard and transparent
groups can contain prompts and other prompt groups.

138
Standard Groups Transparent Groups ...

Standard and Transparent Groups


The main difference between standard and transparent
groups is whether the group navigation and headers
are displayed or hidden. Both standard and transparent
groups can contain prompts and other prompt groups.

Group
Navigation

Group
Headers

139
Standard Groups Transparent Groups

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-95

Selection Groups
Selection groups enable you to display different prompts
based on a condition.
Example: Depending on the country, a report can prompt
the user for state and city or for city only. The
response to the initial prompt determines
which additional prompts to display.

140

Defining Selection Groups


When you add a new selection group, you must define
the following:
Displayed text

Name

Selection-dependent
groups

141 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-96 Chapter 5 Creating Stored Processes

Defining Selection Groups


The displayed
text is used as
the initial prompt
that is displayed
to the user.
The choices for
the initial prompt
become the
values for the
selection-dependent groups.

142 continued...

Defining Selection Groups


You can define one or more prompts for each selection-
dependent group. The prompts defined under these
values determine which prompts are displayed to the
user when that group is selected.

143

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-97

Creating a Stored Process with a Selection Group

This demonstration illustrates how to create a stored process that uses a selection group to enable users to
conditionally select different prompts.

This demonstration assumes that you have SAS Enterprise Guide and the FT Sales by Year
project open.
1. Select File New Project.
2. Create a new stored process from an existing SAS program.
%global category subcategory year_min year_max;
*ProcessBody;
LIBNAME sales meta library="Sales Analysis Library";
%macro spreport;
AXIS1 STYLE=1 WIDTH=1;
AXIS2 STYLE=1 WIDTH=1 MINOR=NONE;
PROC GCHART DATA=sales.sales_analysis;
HBAR3D Year / SUMVAR=TotalSales
SHAPE=CYLINDER
FRAME
DISCRETE
TYPE=SUM
SUM
NOLEGEND
COUTLINE=BLACK
MAXIS=AXIS1
RAXIS=AXIS2
PATTERNID=MIDPOINT;
FORMAT TotalSales DOLLAR14.;
%if &catyear=CAT %then %do;
WHERE ProductCategory="&category" and
ProductSubcategory="&subcategory";
TITLE1 "Total Sales by Year";
TITLE2 "Product Category: &category";
TITLE3 "Product Subcategory: &subcategory";
%end;
%else %do;
WHERE Year between &year_min and &year_max;
TITLE1 "Total Sales by Year";
%end;
RUN;
QUIT;
%mend;
%stpbegin;
%spreport;
%stpend;

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-98 Chapter 5 Creating Stored Processes

a. Select File New Stored Process.


b. Type SP Sales by Year - Conditional in the Name field.
c. Verify that /Orion Star/Marketing Department/Stored Processes is selected as the value for the
Location field.
d. Click Next to move to Step 2.
e. Click Replace with code and select From My Computer.
f. Navigate to S: Workshop SP.
g. Double-click SPTotalSalesbyYear_conditional.sas.
h. Click Next to move to Step 3.
Because the SAS code that you selected includes the stored process macros, a message is
displayed.

i. Click Yes.

You can manually turn off these options by selecting Include code for.

j. Verify the execution options and then click Next to move to Step 4.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-99

k. Create a new group.


1) Click New New Group.
2) Select Selection group as the value for the Group type field.

When this value is selected, the Selection-Dependent Groups tab becomes available.

3) Type Category or Year in the Displayed text field.


4) Type CATYEAR in the Name field.

5) On the Selection-Dependent Groups tab, create two groups with no default value.
a) Click the Selection-Dependent Groups tab.
b) Click New Group.
c) Type Category in the Displayed text field.
d) Type CAT in the Value field.

The code that you create later must match exactly what you type here in the
Value field, including the case (all uppercase, mixed case, and so on).

e) Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-100 Chapter 5 Creating Stored Processes

f) Click New Group.


g) Type Year in the Displayed text field.
h) Type YEAR in the Value field.

i) Click OK.
The Selection-Dependent Groups tab should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-101

j) Click OK to close the Edit Group window. The updated prompts should resemble the
following:

At this point, you created a prompt to ask the user if he or she wants to subset the report
by category or year. For the Category path, you want to prompt the user to select a
category and subcategory. For the Year path, you only want to prompt the user to select a
year.
l. Create the category prompt.
1) Select the Category prompt group.
2) Select New Prompt from SAS Code for category.
3) Type Select a category in the Displayed text field.
4) Click the Requires a non-blank value check box.
5) Click the Prompt Type and Values tab.
6) Verify that Text is selected as the value for the Prompt type field.
7) Select Users selects values from a dynamic list as the value for the Method for populating
prompt field.
8) Verify that Single Value is selected as the value for the Number of values field.
9) Click Browse next to the Data source field.
10) Navigate to Orion Star Marketing Department Data.
11) Double-click SALES_ANALYSIS.
12) Select ProductCategory as the value for the Column field.
13) Click OK.
m. Create the subcategory prompt.
1) Select the Category prompt group.
2) Select New Prompt from SAS Code for subcategory.
3) Type Select a Subcategory in the Displayed text field.
4) Click the Requires a non-blank value check box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-102 Chapter 5 Creating Stored Processes

5) Click the Prompt Type and Values tab.


6) Verify that Text is selected as the value for the Prompt type field.
7) Select Users selects values from a dynamic list as the value for the Method for populating
prompt field.
8) Verify that Single Value is selected as the value for the Number of values field.
9) Click Browse next to the Data source field.
10) Double-click SALES_ANALYSIS.
11) Select ProductSubcategory as the value for the Column field.
12) Click the Dependencies tab.
13) Click Add to add a dependency for the Subcategory prompt.
14) Select Select a category as the value for the Prompt field.
15) Verify that ProductCategory is selected as the value for the Column field.
16) Select Equal as the value for the Operator field.
17) Click OK.
n. Create the year prompt.
1) Select the Year prompt group.
2) Select New New Prompt.
3) Type year in the Name field.
4) Type Select a year in the Displayed text field.
5) Click the Requires a non-blank value check box.
6) Click the Prompt Type and Values tab.
7) Select Numeric Range as the value for the Prompt type field.
8) Click the Allow only integer values to be selected check box.
9) Type 2001 in the Minimum value allowed field.
10) Type 2008 in the Maximum value allowed field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-103

11) Click OK. The completed prompts should resemble the following:

o. Click Next to move to Step 5.


p. No data sources or targets are required. Click Next to move to Step 6.
q. Verify the summary information and click Finish.
The Specify Values for SP Sales by Year - Conditional window appears.

3. Run the report and subset for category.


a. Select Category.
b. Select Clothing as the value for the Select a category prompt.
c. Select Mens as the value for the Select a subcategory prompt.
After those selections, the window resembles the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-104 Chapter 5 Creating Stored Processes

d. Click Run.

e. Click to close the results and return to the Process Flow window.

4. Run the report again and subset for year.


a. Right-click SP Sales by Year - Conditional and select Reset Prompts. Then right-click
SP Sales by Year - Conditional and select Run SP Sales by Year Conditional.
b. Click Yes when you are prompted to replace the previous results.
c. Select Year.
d. Type 2005 in the From field for the Select a year prompt.
e. Type 2008 in the To field for the Select a year prompt.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.5 Creating Advanced Prompts 5-105

f. Click Run.

5. Save the project.


a. Select File Save Project As.
b. Navigate to S: Workshop sbaft43.
c. Type FT Sales by Year - Conditional in the File name field.
d. Click Save.
6. Select File Exit to close SAS Enterprise Guide.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-106 Chapter 5 Creating Stored Processes

5.6 Solutions

Solutions to Exercises
1. Using SAS Web Report Studio
Use SAS Web Report Studio to run the Product Sales by Customer Age Group stored process for
the year 2007 without building a new report.
a. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by
selecting Start All Programs Internet Explorer.
b. Select Favorites SAS Web Report Studio.
c. Type Ellen in the User name field and type the password provided by your instructor.
d. Click Log On.
e. Select File Open.
f. Select Orion Star Sales Department Stored Processes Product Sales by Customer Age
Group.
g. Click Open.
h. Accept 2007 as the value for the Select Report Year field.
i. Click View Report.
The stored process output is displayed in View mode.

j. Select Log Off Ellen to log off from SAS Web Report Studio.
k. Select OK when you are prompted to discard the changes.
l. Select File Close to close Internet Explorer.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-107

2. Creating a Stored Process


As Ellen, create a stored process from all of the tasks in the Supplier Delivery Report project.
a. Open SAS Enterprise Guide. If necessary, change the connection profile to use Ellen. Open the
Supplier Delivery Report project from the S:\Workshop\SP directory and run all the tasks to
refresh the project.
1) Select Start All Programs SAS SAS Enterprise Guide 4.3.
2) Close the Welcome window.
3) If necessary, follow these steps to change the connection profile to use Ellen:
a) Click Connection to open the Connections window.
b) Double-click Ellens Profile to make it the active profile.
c) Click Close to close the Connections window.
4) Select File Open Project.
5) Select My Computer on the left side of the Open Project window.
6) Navigate to S: Workshop SP.
7) Select Supplier Delivery Report.egp.
8) Click Open.
The Supplier Delivery Report project appears.

The project filters catalog and Internet sales for all suppliers to determine average
delivery time. Because customers primarily pick up orders at the physical store
locations, the retail orders are excluded from this report.
b. Click Run Run Process Flow to run all of the tasks in the project and view the output.
c. Click to close the results and display the Process Flow window.

d. Right-click in the background of the Process Flow window and select Create Stored Process.
1) Type SP Supplier Delivery Report in the Name field.
2) Click Browse to select the metadata folder in which to store the new stored process.
3) Navigate to SAS Folders Orion Star Sales Department Stored Processes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-108 Chapter 5 Creating Stored Processes

4) Click Save to save the location and return to Step 1 of the wizard.
The updated fields should resemble the following:

5) Click Next to move to Step 2 of the wizard.


6) Accept the defaults for the SAS code and click Next to move to Step 3 of the wizard.
7) If the execution options need to change, click the down arrows to change the values after you
change the values one time. Subsequent stored process creation should retain the values that
you set now.
a) Verify or set the server to SASApp - Logical Stored Process Server in the
Execution server field.
b) Select S:\Workshop\SP as the value for the Source filepath field.
c) Accept the default value for Source filename field.
d) Verify that Package is the only output option. (You might need to clear the Streaming
check box.)
8) Click Next to move to Step 4.
9) Accept the default libref information and click Next to move to Step 5 of the wizard.
10) Click Next to move to Step 6 of the wizard because no prompts are needed for this stored
process.
11) Verify that the Run stored process when finished check box is selected and
click Finish.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-109

The stored process is created, registered in the metadata, added to the project, and executed.

Only partial results are shown. Scroll down in the Results window to view the entire
report.
12) Click the down arrow next to the name of the stored process and select Process Flow.

Alternately, you can click the small in the upper right corner of the workspace to
return to the Process Flow window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-110 Chapter 5 Creating Stored Processes

After you return to the Process Flow window, you should see that the stored process was
added.

c. Save the SAS Enterprise Guide project under the name FT Supplier Delivery Report in the
S:\Workshop\sbaft43 location.
1) Select File Save Supplier Delivery Report As.
2) If necessary, navigate to My Computer S: Workshop sbaft43.
3) Type FT Supplier Delivery Report in the File name field.
4) Click Save.
d. Close SAS Enterprise Guide.
1) Select File Exit to close SAS Enterprise Guide.
2) Click OK, if you are prompted, to continue closing the project.
3. Creating a Stored Process from a SAS Program
As Ellen, create a stored process from a SAS program to provide a report for a selected supplier,
Van Dammeren International.
a. Create a new project in SAS Enterprise Guide.
1) Select Start All Programs SAS Enterprise Guide 4.3 to invoke SAS Enterprise Guide.
2) Select New Project from the Welcome window.
3) If necessary, change the connection profile to use Ellens credentials.
b. Create a new stored process in SAS Enterprise Guide, and in Step 1 of the Stored Process Wizard,
name the stored process SP Van Dammeren Feedback.
1) Select File New Stored Process. The Create New SAS Stored Process Wizard window
appears.
2) Type SP Van Dammeren Feedback in the Name field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-111

3) If necessary, click Browse and set the value of the Location field to Orion Star
Sales Department Stored Processes.

4) Click Next to move to Step 2.


c. In Step 2 of the Stored Process Wizard, use the code from the SP Supplier Feedback.sas program
for the stored process. This program is stored in the S:\Workshop\SP folder. Save
the new stored process in the Orion Star Sales Department Stored Process folder.
1) When Step 2 opens, click Replace with code From My Computer.
2) Navigate to My Computer S: Workshop SP.
3) Select SP Supplier Feedback.sas Open.
d. Accept all the defaults for the remaining steps in the Stored Process Wizard. Run the stored
process and review the results.
1) Click Next to move to Step 3.
2) Accept the defaults for Step 3. Click Next to move to Step 4.
3) Click Next to move to Step 5 because there are no parameters for this stored process.
4) Click Next to move to Step 6 because there are no data sources or targets required.
5) In Step 7, verify that the Run stored process when finished check box is selected.
6) Click Finish.
The stored process program is created, registered in metadata, and added to the project.
The output from running the stored process is displayed.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-112 Chapter 5 Creating Stored Processes

The results are a short report followed by a bar chart for the Van Dammeren International
Company.

Use the scroll bar to review all the results from the report step as well as the bar chart step.
e. Close SAS Enterprise Guide without saving the project.
1) Click to close the results and display the Process Flow window.

2) Select File Exit.


3) Click No when you are asked to save the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-113

4. Creating a Stored Process to Include Additional Prompt Attributes and a Footnote


As Ellen, create a new stored process to include additional prompt attributes and a footnote that
indicates which application was used to request the stored process.
a. Open a new SAS Enterprise Guide project.
1) Select Start All Programs SAS SAS Enterprise Guide 4.3.
2) Select New Project from the SAS Enterprise Guide Welcome window.
3) If necessary, change the connection profile to use Ellens credentials.
b. Create a new stored process named SP Supplier Prompt.
1) Select File New Stored Process.
a) In Step 1, type SP Supplier Prompt as the name of the new stored process.
b) Click Browse to set the value of the Location field to Orion Star Sales
Department Stored Processes.
2) Click Next to proceed to Step 2.
c. In Step 2, include the code from S:\Workshop\SP\SP Supplier Feedback.sas.
Select Replace with code From My Computer. Navigate to S:\Workshop\SP and
double-click the SP Supplier Feedback.sas program to add it to the code window.
d. Make the following modifications to the code:
1) Delete the %LET statement at the top of the code. The %LET statement sets a permanent
value for the WANT macro variable and it appears immediately after the LIBNAME
statement.
Original Code

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-114 Chapter 5 Creating Stored Processes

Changed Code

2) In the PROC GCHART step, use the footnote to display information about where the stored
process was run.
Original Code (above the PROC GCHART Step)

Changed Code (above the PROC GCHART Step)

3) Click Next to proceed to Step 3.


4) Verify the following values for Step 3:
a) Execution server value: SASApp - Logical Stored Process Server
b) Source file path: S:\Workshop\SP
c) Source filename: SP Supplier Prompt.sas
d) SAS Result Type: Package
5) Click Next to proceed to Step 4.
e. Add a prompt to the stored process and set a default for the prompt value.
1) In Step 4, select New Prompt from SAS Code for want.
a) When the Edit Prompt window appears, keep want as the value in the Name field.
b) Change the value of the Displayed text field to be Select a Supplier.
c) Click the Requires a non-blank value check box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-115

2) Click the Prompt Type and Values tab.


a) Select User selects values from a dynamic list as the value in the Method for
populating prompt field.
b) Verify that Single value is selected in the Number of values field.
c) Click Browse next to the Data source field.
d) Navigate to Orion Star Sales Department Data.
e) Double-click on the table name SUPPLIERSALES to populate the Data source field.
f) Select Supplier_Name as the value in the Column field. There is no format for this
column.
g) Next to the Default value field, click Select.
h) Click Get values.
i) Scroll down in the list of supplier names, highlight Van Dammeren International, and
click OK to populate the Default values field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-116 Chapter 5 Creating Stored Processes

After you click OK, the Edit Prompt window should resemble the following:

j) Click Next to proceed to Step 5.


3) Verify that the Run this stored process when finished check box is selected.
4) Click Finish to run the stored process.
5) Accept the default value of Van Dammeren International for the Select a Supplier prompt.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-117

6) Click Run. The report for Van Dammeren International is displayed. Notice the footnote
underneath the bar chart.

7) Reset the prompts and rerun the stored process for another supplier.
a) Return to the process flow by clicking SP Supplier Prompt Process Flow.

b) Right-click on the stored process name and select Reset Prompts from the pop-up menu.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-118 Chapter 5 Creating Stored Processes

c) Right-click again on the stored process name and select Run SP Supplier Prompt.
d) Click Yes when you are prompted to replace the previous results.
e) For the second run, select Twain Inc as the value for the Select a Supplier field.
f) Click Run to run the stored process a second time.
The report for Twain Inc should appear. Notice the different supplier name in the title for
the output and the value used for the GCHART footnote.

f. Close SAS Enterprise Guide without saving the project.


1) Select File Exit to close SAS Enterprise Guide.
2) Click No when you are prompted to save the project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-119

Solutions to Student Activities (Polls/Quizzes)

5.01 Multiple Answer Poll Correct Answers


Which of the following statements about SAS Stored
Processes are true?
a. A SAS Stored Process consists of both SAS program
code and SAS metadata.
b. A SAS Stored Process can be run only by the person
who created it.
c. A SAS Stored Process is always static and creates the
same results for every user every time it runs.
d. All SAS Stored Processes can be accessed by
everyone regardless of their security settings.
e. There are different types of SAS applications that can
run stored processes.

10

5.02 Multiple Answer Poll Correct Answer


Which of the following describe the SAS Stored Process
Server?
a. Handles multiple users
b. Automatically handles multiple concurrent client
requests
c. Is specifically designed to execute stored processes

47

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-120 Chapter 5 Creating Stored Processes

5.03 Multiple Answer Poll Correct Answers


Which of the following are true about using the LIBNAME
statement in a stored process program?
a. The metadata engine ensures that metadata security
is enforced.
b. The metadata engine is required.
c. The metadata engine removes physical path
information from stored process programs.

59

5.04 Quiz Correct Answer


What is the icon
used for in the Create
New SAS Stored
Process Wizard?
a. Opens the
Metadata
Editor window
b. Opens the Code
Preview window
c. Runs the stored
process
d. Saves the SAS
code
69

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5.6 Solutions 5-121

5.05 Poll Correct Answer


A base macro variable is generated for every type
of prompt.
True
False

Although macro variables are created for all prompt


types, range prompts do not have a base macro
variable.

92

5.07 Multiple Choice Poll Correct Answer


In the example on the previous slide, what happens if the
%LET statements are not removed from the SAS code?
a. The stored process does not run and creates an error.
b. The stored process runs and creates results for
May 2010.
c. The stored process runs and creates results for
January 2009.
d. The stored process cannot be selected because
it is incomplete.

105

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
5-122 Chapter 5 Creating Stored Processes

5.08 Quiz Correct Answer


Which of the following are valid SAS names?
a. Number of Orders
b. Number_of_Orders
c. #ofOrders
d. 2010HolidayOrders

Valid SAS names are 1 to 32 characters in length;


can contain only letters, numbers, or underscores;
and cannot start with a number.

112

5.09 Quiz Correct Answer


Match the method for populating
prompts to the value being
prompted.

A. User selects an order 2. User selects values


type from a list that is from a static list.
always 1, 2, or 3.
B. User selects text for 1. User types values.
the report title.
C. User selects a customer 3. User selects values
ID, which can change from a dynamic list.
over time.

122

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 6 Creating Dashboards

6.1 SAS BI Dashboard Terminology and Interfaces .......................................................... 6-3

6.2 Designing SAS BI Dashboard Components............................................................... 6-17

6.3 Creating Indicator Data ................................................................................................ 6-24


Demonstration: Using an Information Map Data Source ..................................................... 6-35

Exercises .............................................................................................................................. 6-42

Demonstration: Using an SQL Query Data Source ............................................................. 6-51

6.4 Creating Ranges ........................................................................................................... 6-55


Demonstration: Creating Ranges......................................................................................... 6-59

Exercises .............................................................................................................................. 6-62

6.5 Creating Indicators ....................................................................................................... 6-63


Demonstration: Creating Indicators ..................................................................................... 6-85

Exercises .............................................................................................................................. 6-98

6.6 Creating Dashboards and Defining Interactions ..................................................... 6-101


Demonstration: Creating a New Dashboard ...................................................................... 6-111

Demonstration: Adding a Menu System to a Dashboard................................................... 6-118

Demonstration: Adding Dashboard Interactions ................................................................ 6-126

Exercises ............................................................................................................................ 6-128

6.7 Solutions ..................................................................................................................... 6-129


Solutions to Exercises ........................................................................................................ 6-129

Solutions to Student Activities (Polls/Quizzes) ................................................................... 6-141

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-2 Chapter 6 Creating Dashboards

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-3

6.1 SAS BI Dashboard Terminology and Interfaces

Objectives
Define the purpose of a dashboard.
Describe the SAS BI Dashboard application and the
SAS BI Dashboard portlet.
List the different components used to create
dashboards.
List the SAS platform applications for working
with dashboards.
Describe the SAS BI Dashboard application.
Describe the SAS BI Dashboard portlet.

What Is a Dashboard?
Dashboards are information delivery tools that visually
display key metrics. Information presented this way can
be interpreted at a glance and monitored to support
decision making.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-4 Chapter 6 Creating Dashboards

What Is SAS BI Dashboard?


SAS BI Dashboard is a Web application that enables you
to interactively create and view dashboards.

6.01 Poll
Have you used SAS BI Dashboard to create dashboards,
view dashboards, or both?
Yes
No

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-5

What Is the SAS BI Dashboard Portlet?


The SAS Information Delivery Portal enables you to use
the SAS BI Dashboard portlet to view and interact with
dashboards
in the portal
framework.

6.02 Poll
Have you used the SAS Information Delivery Portal?
Yes
No

10

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-6 Chapter 6 Creating Dashboards

Dashboard Components
Dashboards consist of several components. These
components are objects stored in the metadata repository.

Metadata
Repository

11

Dashboard
A dashboard is a container that displays one or more
indicators or static objects. The dashboard can be
displayed in the SAS Information Delivery Portal or
in the SAS BI Dashboard application.

Indicator Static
Label

12

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-7

Indicator
An indicator is an object that defines the display settings
and other properties for visually displaying information in
a dashboard.

13

Indicator Data
The Indicator Data
component
retrieves data for
an indicator.
This component is
basically a query
against the data
source.

14

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-8 Chapter 6 Creating Dashboards

Range
A range defines the measurement intervals by which a
metric is evaluated. In addition to the code intervals, the
range also defines the colors and labels displayed in an
indicator.

15

Dashboard Metadata Objects


Dashboard components are stored in the SAS Folders
structure in metadata. Each component is identified using
specific suffixes.

.dcx = Dashboard

.imx = Indicator Data

.idx = Indicator

.rdx = Range

16

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-9

6.03 Quiz
What is the difference between an indicator data object
and an indicator object?

18

Creating and Using Dashboards


The platform for SAS Business Analytics provides two
applications for working with dashboards.

SAS BI Dashboard The SAS BI Dashboard application


includes the Dashboard Designer
for creating dashboards and the
Dashboard Viewer for viewing and
interacting with dashboards.
SAS Information The SAS BI Dashboard portlet
Delivery Portal in the SAS Information Delivery
Portal enables users to view and
interact with dashboards within
the portal framework.

20

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-10 Chapter 6 Creating Dashboards

6.04 Poll
Both the Dashboard Viewer and SAS BI Dashboard
portlet enable you to create dashboard components.
Yes
No

22

Viewing Dashboards
You can view dashboards in the SAS BI Dashboard
application or in the SAS Information Delivery Portal.

SAS BI Dashboard SAS Information Delivery Portal

24

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-11

SAS BI Dashboard: Dashboard Viewer


The Dashboard Viewer enables you to view dashboards
and indicators outside of the portal.

25

Capabilities of the Dashboard Viewer


The Dashboard Viewer provides the ability
to save favorites, manage comments, print
indicators, and personalize alerts.

26

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-12 Chapter 6 Creating Dashboards

SAS Information Delivery Portal


The SAS BI Dashboard portlet in the SAS Information
Delivery Portal enables you to view dashboards.

27

Capabilities of the SAS BI Dashboard Portlet


The SAS BI Dashboard portlet enables you to interact
with dashboard objects. Depending on the object and how
it was defined, you might be able to zoom in on an
indicator, print the indicator, and view tooltips.
You cannot access
comments, alerts,
or favorites in the
SAS BI Dashboard
portlet.

28

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-13

6.05 Multiple Answer Poll


Assuming that the indicator supports each of the
following, which of these can be accomplished in the
SAS BI Dashboard portlet?
a. Access dashboard favorites
b. Add comments to an indicator
c. Print an indicator
d. View indicator tooltips
e. Zoom in on an indicator

30

Edit Portlet
The (Edit content icon) in the portlet opens the
Edit Portlet window, where you specify the following:
Portlet title

Portlet
dimensions
Auto refresh
interval
Dashboard
to display

32

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-14 Chapter 6 Creating Dashboards

SAS BI Dashboard Portlet Icons


Several icons in the upper right corner of the SAS BI
Dashboard portlet enable you to manage the dashboard
actions.
Print Refresh
Manage
Dashboards

View in BI Dashboard Viewer

The icon is visible only to users with the required


metadata settings for managing dashboards.

33

SAS BI Dashboard: Dashboard Designer


The Dashboard Designer enables you to build dashboard
components using an interactive WYSIWYG (what you
see is what you get) editor.

34

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.1 SAS BI Dashboard Terminology and Interfaces 6-15

Accessing the Dashboard Designer


To open the Dashboard Designer from the Dashboard
Viewer, select Manage Dashboards.

To open the window from the SAS BI Dashboard portlet,


select (the Manage Dashboards icon).

35

Dashboard Designer
The Dashboard Designer appears with the Objects pane
and the workspace displayed.

Objects
Pane

Workspace

36

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-16 Chapter 6 Creating Dashboards

Capabilities of the Dashboard Designer


The Objects pane in the Dashboard Designer enables
you to select dashboard objects using the drag-and-drop
method. The Properties pane enables you to specify
properties for the different dashboard objects.

Objects
pane Properties
pane

37

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.2 Designing SAS BI Dashboard Components 6-17

6.2 Designing SAS BI Dashboard Components

Objectives
Describe the process for designing dashboard
components.
List the steps to build the dashboard components
based on the design.
Describe the Dashboard Designer interface.

40

Before Building a Dashboard


Before you begin to build a dashboard using the
Dashboard Designer, you should spend time designing
the dashboard.
1. Determine what type of information the dashboard
needs to convey.
2. Choose the indicators that you will display in the
dashboard.
3. Locate or create the necessary data sources.
The indicators that you choose determine the type of data
that you need. You might need to create new data
sources, calculated fields, or summary tables.

41

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-18 Chapter 6 Creating Dashboards

Steps to Build a Dashboard


After you design the dashboard, the following steps are
typical for building the components to implement your
design:
1. Define indicator data .
2. Create a range (if necessary).
3. Create one or more indicators .
4. Create the dashboard and define interactions.
5. Test the dashboard and its corresponding
components.

42

Discussion

Why is it is a good idea to define the indicator


data before defining ranges, indicators, and
dashboards?

43

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.2 Designing SAS BI Dashboard Components 6-19

Dashboard Metadata Objects (Review)


Dashboard components are stored in the SAS Folders
structure in metadata. Each component is identified using
specific suffixes.

.dcx = Dashboard

.imx = Indicator Data

.idx = Indicator

.rdx = Range

44

Naming and Organizing Dashboard Objects


There are several ways to name and organize the
metadata objects for the various dashboard components.
One method is to create folders for each type of object:

45 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-20 Chapter 6 Creating Dashboards

Naming and Organizing Dashboard Objects


Another approach is to create a project level folder to
contain all of the dashboard objects for the project. With
this approach, it is helpful to use some sort of identifier in
the name to separate the different types of objects.

Project level folder

Dashboard objects
named with a three-
character prefix:
DAT indicator data
DSH dashboard
IND indicator
RNG range
46

Accessing the Dashboard Designer (Review)


To open the Dashboard Designer from the Dashboard
Viewer, select Manage Dashboards.

To open the window from the SAS BI Dashboard portlet,


select (the Manage Dashboards icon).

47

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.2 Designing SAS BI Dashboard Components 6-21

6.06 Multiple Choice Poll


Which of the following situations explains why the
Manage Dashboards link is not available in the
Dashboard Viewer?
a. The SAS BI Dashboard application is not installed.
b. You do not have the necessary permission to create
dashboards.
c. The Manage Dashboards link is available only in the
SAS BI Dashboard portlet in the portal.
d. The Dashboard Viewer does not provide a way to
access the Dashboard Designer.

49

Capabilities of the Dashboard Designer


The Objects pane in the Dashboard Designer enables
you to select dashboard objects using the drag-and-drop
method. The Properties pane enables you to specify
properties for all of the different dashboard objects.

Objects
Pane Properties
Pane

Workspace

51

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-22 Chapter 6 Creating Dashboards

Creating New Objects


You can create a new object in the Dashboard Designer
using several methods. New Menu
File Menu

Workspace Icons

52

Objects Pane: Library View


The Library view of the Objects pane
displays the SAS Folder tree and all
available dashboard objects.

You can use the


Show drop-down
list to filter the
display for a
specific type.

You can use icons


to refresh the view,
create a new folder,
or delete an object.

53

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.2 Designing SAS BI Dashboard Components 6-23

Maximizing the Workspace


If you need more room to display the dashboard in the
workspace, you can collapse the Objects and Properties
panes using the double chevron icons.

54

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-24 Chapter 6 Creating Dashboards

6.3 Creating Indicator Data

Objectives
Describe the four data sources that can be used when
you define indicator data.
List the display attributes that can be set for each
column in indicator data.
Use an information map as the data source for an
indicator data object
Use an SQL query as the data source for an indicator
data object.

57

Steps to Build a Dashboard (Review)


After you design the dashboard, the following steps are
typical for building the components to implement your
design:
1. Define indicator data .
2. Create a range (if necessary).
3. Create one or more indicators .
4. Create the dashboard and define interactions.
5. Test the dashboard and its corresponding
components.

58

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-25

Indicator Data (Review)


The Indicator Data
component
retrieves data for
an indicator.
This component is
basically a query
against the data
source.

59

Indicator Data and Indicators


In most cases, each row of data from the indicator data
object corresponds to a visual element in the indicator.
It is a best practice to aggregate the data as much as
possible when creating indicator data. Doing so ensures
the best performance in a dashboard and avoids
unexpected results, such as too many rows or gauges or
incorrect summaries.

60

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-26 Chapter 6 Creating Dashboards

Indicator Data: Data Sources


Each indicator data object has a single data source.
There are four types of data sources:

Information Business user view of relational or


Map multidimensional data
SQL Query Query that you write in order to
generate data values
Stored Process SAS program that generates a data
source
Table Relational table that was previously
defined in metadata

61

Indicator Data: Information Map


An information map data source enables you to select one
or more data items, and you have the option to select filters.
Multiple filters are combined with an AND operator.

Prompted filters can be used, but they must have


a default value and they do not prompt the user.
In SAS BI Dashboard, the maximum number
of rows returned by an information map data source
is 10,000.

62

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-27

Indicator Data: SQL Query


An SQL query data source enables you to write an SQL
query that returns columns and rows of data.
The default library reference (sasdata) and physical
location is defined in the SAS BI Dashboard
configuration files.
The SQL query can contain SAS functions and
formats.

63

Indicator Data: Stored Process


A stored process data source enables you to use a stored
process that was predefined in metadata.
The stored process must create a data set with the
desired columns and rows.

64

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-28 Chapter 6 Creating Dashboards

Indicator Data: Table


A table data source enables you to select columns from a
table that was predefined in metadata.
You can specify the statistic for each measure.

You can specify a filter to subset the rows.

In SAS BI Dashboard, the maximum number of rows


returned by a table data source is 10,000.

65

Indicator Data Column Attributes


When you define indicator data, you can also specify the
display attributes for each data column that is retrieved.

Each indicator display type might use the column


attributes in different ways. Some of the indicator
display types do not use any of the column attributes.

66 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-29

Indicator Data Column Attributes

Column Name The name of the data column. This attribute cannot be modified.
Category Label The data column that provides a label to identify each row.
Label The data column that provides a formatted value for each row.

Hyperlink The data column that provides a URL for each row.

Property Alias The text string used in tooltip text and for axis labels.

Category Label
(Year) Label
(SalesLabel)
67

6.07 Multiple Answer Poll


Which of the following are valid data sources for an
indicator data object?
a. Information map
b. OLAP cube
c. SAS report
d. SQL query
e. Stored process
f. Table

69

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-30 Chapter 6 Creating Dashboards

Creating Information Maps for Indicator Data


Consider the following when you create information maps
that will be used as data sources for indicator data:
The information map should summarize the data into
as few rows as possible.
It is important to create data items for each measure
that has the appropriate aggregation statistic because
the aggregation functions for measures cannot be
changed in SAS BI Dashboard.
It is important to create all of the desired filters in the
information map because filters cannot be created in
SAS BI Dashboard.
Prompted filters require a default value when used in
SAS BI Dashboard. The user is never prompted to
select a value and only the default is used.
72

Using an Information Map in a Dashboard


Follow these steps to use an information map as a data
source for an indicator data object:
1. Create an information map with the desired data
items and filters.
2. Create a new indicator data item and use the
information map data source.

73

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-31

Create the Information Map


Step 1.
Create a new information map by selecting the desired
data source (or
sources).
Create data items
and filters and
specify their
properties.

74

Create a New Indicator Data Item


Step 2.
Create an indicator data item in the Dashboard Designer.
Select Information map as your data source, browse to
the information map that you want to use, and select the
desired data items and filters.

75

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-32 Chapter 6 Creating Dashboards

Discussion

If you want an indicator data object to filter the


information map data source to include only sales
over $10,000 or a quantity greater than 1,000,
what sort of filter or filters would you create?

76

Information Maps Based on OLAP Cubes


The data returned from an OLAP information map is
flattened into a two-dimensional table structure. You
assign a role for each dimension when you define the
data source.
You must
assign the
role of Row
to at least
one data
column.

77

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-33

Demonstration: Information Map


Example: You create an information map from the
Orion Star Organization table.

Create data items and set data item properties.

78

Demonstration: Indicator Data


Example: You create indicator data using the BID
Department Salary information map as
the data source.

79

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-34 Chapter 6 Creating Dashboards

Exercise: Information Map


Example: You create an information map from the
FT US Customer Subset table.

Create data items and set data item properties.

80

Exercise: Indicator Data


Example: You create indicator data using the FT Yearly
Sales by Product Group information map as
the data source.

81

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-35

Using an Information Map Data Source

This demonstration illustrates how to use an information map as a data source for a dashboard indicator
data object

Creating the Information Map

1. Log on to SAS Information Map Studio.


a. Select Start All Programs SAS SAS Information Map Studio 4.2.
b. Log on and use Erics credentials.
1) Verify that the connection profile is My Server and click OK.
2) Type Eric in the User ID field and specify the password provided by the instructor.
3) Click OK.
c. If necessary, click OK to close the Create an Information Map window.
2. Select the data source and create data items.

a. If necessary, click to show the Resources pane.

b. Click (the Application Servers tab) in the Resources pane.

c. Click to expand the Orion Star Library.

d. Double-click the Orion Star Organization table to add it to the Selected Resources list box of
the Design tab (or right-click the table name and select Insert Table).

e. Click to hide the Resources pane.

f. Click to expand Orion Star Library.

g. Click to expand the Orion Star Organization table and display the physical column names.

h. Double-click the following columns to create new data items from them:
Department
Salary

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-36 Chapter 6 Creating Dashboards

i. Create a new calculated data item.


1) Select Insert New Data Item.
2) Type Number of Employees in the Data item name field.
3) Click Edit to assign the expression that will populate the new data item.
4) Double-click the Counting Aggregation folder on the Functions tab to expand it.
5) Click COUNT(argument) to add the function to the expression.
6) Select the Data Sources tab.
a) Double-click Physical Data to expand the category.
b) Double-click Orion Star Organization to expand the table.
c) Double-click Salary to add it to the expression.

7) Click Validate Expression.


8) Click OK to close the message window.
9) Click OK to close the Expression Editor.
10) Select Classifications, Aggregations, Formats in the selection list on the left side of the
Data Item Properties window.
11) Select COMMA as the value for the Format name field.
12) Click OK to close the Data Item Properties window.
The information map should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-37

3. Test the information map.

a. Select Tools Run a Test Query (or select on the toolbar).

b. Click to add all of the data items to the query.

c. Accept the default output options and click Run Test.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-38 Chapter 6 Creating Dashboards

d. Click View SQL to view the SQL query code that was run for the test.

The default for all measures is to use the SUM function.

e. Click Close to close the View Query window.


f. Click Close to close the Results window.
g. Click Close to close the Test the Information Map window.
4. Save the information map and close SAS Information Map Studio.
a. Select File Save As.
b. Navigate to Orion Star Marketing Department Dashboards.
c. Type BID Department Salary in the Name field.
d. Click Save.
e. Select File Exit to close SAS Information Map Studio.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-39

Building a Dashboard Indicator Data Object

1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS BI Dashboard. The SAS BI Dashboard logon
page appears.

The URL used to access SAS BI Dashboard on the classroom machines is specific to the
classroom configuration. The URL used at your site will be different.
3. Type Eric in the User name field and specify the password provided by your instructor.
4. Click Log On.
The Dashboard Viewer appears and displays the previously viewed dashboard by default.

The option to open a previous dashboard can be set using the View menu. Although this is the
default behavior, this option is not selected on the classroom machines.
5. Select Manage Dashboards to open the Dashboard Designer.
6. Create indicator data for sales by month.
a. Select File New Indicator Data.
b. Type DAT_BID Employee Salaries in the Name field.
c. Click OK.
d. Select Information map as the value for the Data source field.
e. Click Browse next to the Information map field.
f. Navigate to Orion Star Marketing Department Dashboards.
g. Select BID Department Salary.
h. Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-40 Chapter 6 Creating Dashboards

The Information Map section should resemble the following:

The Data Mapping tab in the Preview Design area should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-41

i. Select the Query Results tab to view the columns and rows returned by the query.

j. Save the new indicator data.


1) Select File Save As.
2) Navigate to Orion Star Marketing Department Dashboards.
3) Accept the value for the Name field.
4) Click Save.
7. Click Log Off in the upper right corner to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-42 Chapter 6 Creating Dashboards

Exercises

1. Creating a New Information Map to be Used as a Data Source in SAS BI Dashboard

a. Log on to SAS Information Map Studio. Use Ellens credentials.


b. Create data items from several columns of the FT US Customer Subset table in FT Library.

Physical Column Data Item Properties

CostPrice_Per_Unit Property Value

Data item name Total Cost

Format DOLLAR14.0

Product_Category <accept default values>

Quantity Property Value

Data item name Total Quantity

Format COMMA12.0

Total_Retail_Price Property Value

Data item name Total Sales

Format DOLLAR14.0

c. Create a new data item named Year that is calculated by extracting the year from the order date.

Property Value

Data item name Year

Expression YEAR(<<FT US Customer Subset.Order_Date>>)

Format F4.0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-43

d. Test the information map.

e. Save the information map as FT Yearly Sales by Product Group in Orion Star
Sales Department Dashboards and close SAS Information Map Studio.
2. Creating a New Indicator Data Object Using the New Information Map as the Data Source
a. Log on to SAS BI Dashboard. Use Ellens credentials.
b. Create a new indicator data object named DAT_FT Sales by Year and Product.
Use the FT Yearly Sales by Product Group information map as the data source.

c. Save the new indicator data object in the Orion Star Sales Department Dashboards
location and log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-44 Chapter 6 Creating Dashboards

What Is Structured Query Language (SQL)?


Structured Query Language (SQL) is a standardized
language originally designed as a relational database
query tool.
SQL is currently used in many software products to
retrieve and update data. SAS BI Dashboard enables you
to write an SQL query that provides a data source for an
indicator data object.

85

6.08 Poll
Have you have written SQL queries?
Yes
No

87

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-45

SQL Syntax
A SELECT statement is used to query one or more tables
and contains smaller building blocks called clauses.
select Emp_ID, Emp_Gender, Salary
from sasdata.Employee_Payroll
clauses
where Employee_Gender = 'F'

88

Selecting Columns and Rows


You can use an asterisk in a SELECT statement to
include all of a tables columns.
select *
from sasdata.Employee_Payroll

Use a WHERE clause to specify a condition that the


data must satisfy before being selected.
where Employee_Gender = 'F'

89

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-46 Chapter 6 Creating Dashboards

6.09 Poll
The WHERE clause is used to select columns.
True
False

91

Indicator Data: SQL Query (Review)


An SQL query data source enables you to write an SQL
query that returns columns and rows of data.
The default library reference (sasdata) and physical
location are defined in the SAS BI Dashboard
configuration files.
The SQL query can contain SAS functions and
formats.

93

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-47

Creating SQL Queries for Indicator Data


Consider the following when you create SQL queries that
will be used as a data source for indicator data:
The query should summarize the data into as few
rows as possible.
Use SAS formats in the SELECT statement to format
the results as desired.
Use a WHERE clause to limit the number of rows.

Limit the amount of processing done by the query for


faster performance. Although you can write advanced
queries and join many different tables, if a query takes
a long time to execute, there might be a noticeable
delay when the dashboard is displayed.

94

Using an SQL Query Data Source


Follow these three steps to use an SQL query as a data
source for an indicator data object:
1. Identify the library and table names for the desired
data source.
2. Write an SQL query that returns the desired rows and
columns.
3. Create a new indicator data item. Use the SQL query
data source.

95

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-48 Chapter 6 Creating Dashboards

Identify the Library and Table Names


Step 1.
SAS BI Dashboard uses SASDATA as the default library
name for SQL query data sources.
Submit the following query in a test indicator data item to
determine which tables are available in the SASDATA
library:
select libname,memname,nobs
from sashelp.vtable where libname = 'SASDATA'

96

SASHELP.VTABLE is a reference to a SAS dictionary table. Dictionary tables are read-only SAS views
that contain session metadata, such as information about SAS libraries, data sets, and external files in use
or available in the current SAS session.
Dictionary tables are created at SAS session initialization, updated automatically by SAS, limited to
Read-Only access, and can be accessed using the Sashelp libref.

Writing the SQL Query


Step 2.
After identifying the library and table names for the
desired data source, write an SQL query to accomplish
the following:
Select the desired data items

Apply attributes and formatting

Subset the rows

97

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-49

Creating a New Indicator Data Item


Step 3.
Create an indicator data item in the Dashboard Designer.
Select SQL query as your data source. Write the SQL
query.

Clicking Apply Query Changes executes the query code.


If the code does not run successfully, an error message is
displayed.
98

Demonstration: SQL Query


Example: You use the SQL query below as the data
source for new indicator data.
select input(year,4.) as Year format=4.,
actual, forecast, l95, u95, target
from sasdata.salesforecast

99

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-50 Chapter 6 Creating Dashboards

Demonstration: SQL Query


Example: You use the SQL query below as the data
source for new indicator data.
select *
from sasdata.profitCompanyTarget

100

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-51

Using an SQL Query Data Source

This demonstration illustrates how to use an SQL query as a data source for a dashboard indicator data
object.
1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS BI Dashboard. The SAS BI Dashboard logon
page appears.
3. Type Eric in the User name field and specify the password provided by your instructor.
4. Click Log On.
5. Select Manage Dashboards to open the Dashboard Designer.
6. Create the BID Sales Forecast indicator data.
a. Select File New Indicator Data.
b. Type DAT_BID Sales Forecast in the Name field.
c. Click OK.
d. Select SQL query as the value for the Data source field.
e. Type the following in the SQL query field:
select input(year,4.) as Year format=4., actual, forecast, L95,
U95, target from sasdata.salesforecast

f. Click Apply Query Changes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-52 Chapter 6 Creating Dashboards

The Data Mapping tab should resemble the following:

g. Click the Query Results tab.

h. Select File Save.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.3 Creating Indicator Data 6-53

7. Create the BID Targeted Sales by Company indicator data.


a. Select File New Indicator Data.
b. Type DAT_BID Targeted Sales by Company in the Name field.
c. Click OK.
d. Select SQL query as the value for the Data source field.
e. Type the following in the SQL query field:
select * from sasdata.profitCompanyTarget

f. Click Apply Query Changes.


The Data Mapping tab should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-54 Chapter 6 Creating Dashboards

g. Click the Query Results tab.

h. Select File Save.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.
8. Click Log Off.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.4 Creating Ranges 6-55

6.4 Creating Ranges

Objectives
Describe the purpose of a range.
List the components that make up a range and what
they are used for.
List the steps to define a range.
Describe the range for the Sales by Month example.

104

Steps to Build a Dashboard (Review)


After you design the dashboard, the following steps are
typical for building the components to implement your
design:
1. Define indicator data .
2. Create a range (if necessary).
3. Create one or more indicators .
4. Create the dashboard and define interactions.
5. Test the dashboard and its corresponding
components.

105
1
0
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-56 Chapter 6 Creating Dashboards

Range
A range defines the intervals for a metric. In addition to
the intervals, a range also defines the colors and labels
displayed in an indicator.

106
1
0
6

Components of a Range
There are several
components of a
range, including
the following:

Code Interval Specification of which interval the range


falls within

Relation Values that you specify to determine


Lower Value how to group the measure data
Upper Value
Label Value used in different display types as
tooltips, legends, axes, and so on
Color Color used in an indicator display
107
1
0
7

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.4 Creating Ranges 6-57

6.10 Poll
Is it possible to have multiple interval ranges with the
same Code Interval value?
Yes
No

109

Steps to Define a Range


The following are the basic steps to define a range:
1. Determine the data source and the level of the data
for which you want to define a range.
2. Add each interval value.
3. Specify attributes such as the code interval, label,
and color for each interval range.
4. Save the range in the desired SAS Folders metadata
location.

111

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-58 Chapter 6 Creating Dashboards

Demonstration: Range
Example: You create a range to use with sales target
values that are grouped by company.

112

Exercise: Range
Example: You create a range to use with sales values
that are grouped by product category.

113

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.4 Creating Ranges 6-59

Creating Ranges

In this demonstration, you create several ranges.


1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS BI Dashboard.
3. Type Eric in the User name field and specify the password provided by your instructor.
4. Click Log On.
5. Select Manage Dashboards to open the Dashboard Designer.
6. Create a new range to use with total sales values grouped by month.

a. Select File New Range.


b. Type RNG_BID Targeted Sales by Company in the Name field.
c. Click OK.
d. Click Add Interval.
e. Type 2,500 in the Upper bound field.
f. Click OK.
g. Click Add Interval.
h. Type 7,000 in the Upper bound field.
i. Click OK.
j. Click Add Interval.
k. Type 12,000 in the Upper bound field.
l. Click OK.
m. Click Add Interval.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-60 Chapter 6 Creating Dashboards

n. Type 20,000 in the Upper bound field.


o. Click OK.
The list of intervals and their attributes should resemble the following:

p. Change the attributes for the < 2,500 interval.


1) Click in the Label column and type Questionable.
2) Click in the Color column and select a dark red color.
q. Change the attributes for the >= 2,500 and < 7,000 interval.
Click in the Label column and type Low.
r. Change the attributes for the >= 7,000 and < 12,000 interval.
1) Select On Target in the Code Interval field.
2) Click in the Label column and type Typical.
3) Verify that the color changed to yellow.
s. Change the attributes for the >= 12,000 and < 20,000 interval.
1) Select Above Target in the Code Interval field.
2) Click in the Label column and type High.
3) Verify that the color changed to green.
t. Change the attributes for the >= 20,000 interval.
1) Select Above Target in the Code Interval field.
2) Click in the Label column and type Outstanding.
3) Click in the Color column and select a dark green color.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.4 Creating Ranges 6-61

The updated list of intervals and their attributes should resemble the following:

u. Save the new range.


1) Select File Save As.
2) Navigate to Orion Star Marketing Department Dashboards.
3) Accept the value for the Name field.
4) Click Save.
7. Click Log Off in the upper right corner to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-62 Chapter 6 Creating Dashboards

Exercises

3. Creating a New Range


a. Log on to SAS BI Dashboard. Use Ellens credentials.
b. Create a new range named RNG_FT Total Sales by Product.

c. Save the new range in the Orion Star Sales Department Dashboards location and logoff
SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-63

6.5 Creating Indicators

Objectives
List the items that must be defined when you create
an indicator.
Describe the categories of indicator properties.
List the purpose of the indicator configuration icons.
Explore the indicator display types.
List the indicator graph styles.
Describe how indicator display types aggregate data.
List the steps to create an indicator.

117

Steps to Build a Dashboard (Review)


After you design the dashboard, the following steps are
typical for building the components to implement your
design:
1. Define indicator data .
2. Create a range (if necessary).
3. Create one or more indicators .
4. Create the dashboard and define interactions.
5. Test the dashboard and its corresponding
components.

118
1
1
8

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-64 Chapter 6 Creating Dashboards

Indicator (Review)
An indicator is an object that defines the display settings
and other properties for visually displaying information
on a dashboard.

119
1
1
9

Creating an Indicator
When you create an indicator, you must specify a name,
a display type, and, in most cases, select the indicator
data that will be displayed by the indicator.

120
1
2
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-65

6.11 Multiple Answer Poll


Which of the following properties are required when you
create a new indicator?
a. Name
b. Description
c. Display Type
d. Indicator Data
e. Range

122

Indicator Properties
Each indicator display type has different properties that
are grouped into the following categories:
General General properties include the indicator
height and width as well as the display
type.
Role Mapping The role mapping properties determine
which data is included in the display,
how the data is grouped, how the data is
summarized, and so on.
User User personalization properties enable
Personalization you to choose whether to enable users
to manage alerts and whether to limit
which e-mail templates the user can
select.
124
1
2
4

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-66 Chapter 6 Creating Dashboards

Indicator Configuration Icons


At the top of the Properties pane for the indicator, there
are icons that enable you to further customize the
indicator by configuring links, alerts, and gauge
properties.
Not all display types enable Define indicator
you to access each of the alerts
different configuration icons.

Define Define gauge


indicator links properties

125
1
2
5

Types of Indicator Displays


You can choose from more than 25 different types of
indicator displays. Some of the display types need very
specific indicator data, and others can work with most
indicator data.

126

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-67

Display Types
Bar Chart with Bullet Bar Chart with Reference Lines

Bubble Plot

127 continued...

Display Types
Chart with Slider Prompt

Clustered Bar Chart Custom Graph

128 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-68 Chapter 6 Creating Dashboards

Display Types
Dual Line Chart Dynamic Prompt

Forecast Chart

Dynamic Text

129 continued...

Display Types
Interactive Summary and Bar Chart Interactive Summary and Scatter Plot

Interactive Summary and Targeted Bar Chart

130 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-69

Display Types
KPI (Key Performance Indicator) Line Chart with Reference Lines

Needle Plot Pie Chart

131 continued...

Display Types
Range Map Scatter Histogram

Scatter Plot Schedule Chart

132 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-70 Chapter 6 Creating Dashboards

Display Types
Simple Bar Chart Spark Table

Stacked Bar Chart Targeted Bar Chart

133 continued...

Display Types
Tile Chart Vector Plot

Waterfall Chart

134

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-71

Graph Styles
Many of the display types enable you to select from
several graph styles, including the following:

Crisp Gloss Nomad

None Pressed Sheen

135

6.12 Quiz
What is the difference between the simple bar chart
display type, with all blue bars, and the targeted bar chart
that shows different colored bars?

137

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-72 Chapter 6 Creating Dashboards

Aggregation Indicator Display Type

Bar Chart with Bullet


Aggregates

YES
Aggregation

AVG
Type

Bar Chart with Reference Lines YES AVG


Many of the indicator Bubble Plot NO
Chart with Slider Prompt NO
display types automatically Clustered Bar Chart YES SUM

aggregate measure Custom Graph


Dual Line Chart
NO
NO

values. Dynamic Prompt


Dynamic Text
NO
NO

When at least one Forecast Chart


Interactive Summary and Bar Chart
NO
YES AVG

grouping value is used, Interactive Summary and Scatter Plot


Interactive Summary and Targeted Bar Chart
NO
YES AVG
the measures are KPI NO
Line Chart with Reference Lines YES AVG
aggregated using a Needle Plot NO

specific aggregation type.


Pie Chart YES SUM
Range Map NO
Scatter Histogram NO
Scatter Plot NO
Schedule Chart NO
Simple Bar Chart YES SUM
Spark Table YES <selectable>
Stacked Bar Chart YES SUM
Targeted Bar Chart YES AVG
Tile Chart YES AVG
Vector Plot NO
Waterfall Chart YES AVG
139

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-73

Indicator Display Type Aggregates Aggregation Type

Bar Chart with Bullet YES AVG


Bar Chart with Reference Lines YES AVG
Bubble Plot NO
Chart with Slider Prompt NO
Clustered Bar Chart YES SUM
Custom Graph NO
Dual Line Chart NO
Dynamic Prompt NO
Dynamic Text NO
Forecast Chart NO
Interactive Summary and Bar Chart YES AVG
Interactive Summary and Scatter Plot NO
Interactive Summary and Targeted Bar Chart YES AVG
KPI NO
Line Chart with Reference Lines YES AVG
Needle Plot NO
Pie Chart YES SUM
Range Map NO
Scatter Histogram NO
Scatter Plot NO
Schedule Chart NO
Simple Bar Chart YES SUM
Spark Table YES <selectable>
Stacked Bar Chart YES SUM
Targeted Bar Chart YES AVG
Tile Chart YES AVG
Vector Plot NO
Waterfall Chart YES AVG

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-74 Chapter 6 Creating Dashboards

Alerts Indicator Display Type

Bar Chart with Bullet


Alerts

YES
Notes

Bar Chart with Reference Lines YES


Many, but not all, of the Bubble Plot NO
Chart with Slider Prompt NO
indicator display types Clustered Bar Chart NO

enable the defining of Custom Graph


Dual Line Chart
YES
NO
Requires a range

alerts. Dynamic Prompt


Dynamic Text
YES
YES
Requires a range
Requires a range
Forecast Chart NO
Interactive Summary and Bar Chart YES
Interactive Summary and Scatter Plot YES
Interactive Summary and Targeted Bar Chart YES
KPI YES
Line Chart with Reference Lines YES
Needle Plot NO
Pie Chart NO
Range Map YES
Scatter Histogram NO
Scatter Plot YES
Schedule Chart NO
Simple Bar Chart NO
Spark Table YES Requires a range
Stacked Bar Chart NO
Targeted Bar Chart YES
Tile Chart YES
Vector Plot YES
Waterfall Chart YES
140

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-75

Indicator Display Type Alerts Notes


Bar Chart with Bullet YES
Bar Chart with Reference Lines YES
Bubble Plot NO
Chart with Slider Prompt NO
Clustered Bar Chart NO
Custom Graph YES Requires a range
Dual Line Chart NO
Dynamic Prompt YES Requires a range
Dynamic Text YES Requires a range
Forecast Chart NO
Interactive Summary and Bar Chart YES
Interactive Summary and Scatter Plot YES
Interactive Summary and Targeted Bar Chart YES
KPI YES
Line Chart with Reference Lines YES
Needle Plot NO
Pie Chart NO
Range Map YES
Scatter Histogram NO
Scatter Plot YES
Schedule Chart NO
Simple Bar Chart NO
Spark Table YES Requires a range
Stacked Bar Chart NO
Targeted Bar Chart YES
Tile Chart YES
Vector Plot YES
Waterfall Chart YES

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-76 Chapter 6 Creating Dashboards

Links Indicator Display Type

Bar Chart with Bullet


Define
Link
YES
Link
Destination
YES
Bar Chart with Reference Lines YES YES
Most indicator display Bubble Plot YES YES
Chart with Slider Prompt NO YES
types enable you to define Clustered Bar Chart YES YES

a link to other content or it Custom Graph


Dual Line Chart
YES
YES
YES
YES

can be the destination of a Dynamic Prompt


Dynamic Text
NO
NO
YES
YES
link from another indicator. Forecast Chart YES YES
Interactive Summary and Bar Chart YES NO
Interactive Summary and Scatter Plot YES NO
Interactive Summary and Targeted Bar Chart YES NO
KPI YES YES
Line Chart with Reference Lines YES YES
Needle Plot YES YES
Pie Chart YES YES
Range Map YES YES
Scatter Histogram YES YES
Scatter Plot YES YES
Schedule Chart YES YES
Simple Bar Chart YES YES
Spark Table YES YES
Stacked Bar Chart YES YES
Targeted Bar Chart YES YES
Tile Chart YES YES
Vector Plot YES YES
Waterfall Chart YES YES
141

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-77

Define Link
Indicator Display Type
Link Destination
Bar Chart with Bullet YES YES
Bar Chart with Reference Lines YES YES
Bubble Plot YES YES
Chart with Slider Prompt NO YES
Clustered Bar Chart YES YES
Custom Graph YES YES
Dual Line Chart YES YES
Dynamic Prompt NO YES
Dynamic Text NO YES
Forecast Chart YES YES
Interactive Summary and Bar Chart YES NO
Interactive Summary and Scatter Plot YES NO
Interactive Summary and Targeted Bar Chart YES NO
KPI YES YES
Line Chart with Reference Lines YES YES
Needle Plot YES YES
Pie Chart YES YES
Range Map YES YES
Scatter Histogram YES YES
Scatter Plot YES YES
Schedule Chart YES YES
Simple Bar Chart YES YES
Spark Table YES YES
Stacked Bar Chart YES YES
Targeted Bar Chart YES YES
Tile Chart YES YES
Vector Plot YES YES
Waterfall Chart YES YES

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-78 Chapter 6 Creating Dashboards

Ranges Indicator Display Type

Bar Chart with Bullet


Range

YES
Notes

Bar Chart with Reference Lines YES


Only some of the indicator Bubble Plot NO
Chart with Slider Prompt NO
display types support the Clustered Bar Chart NO

use of ranges. Custom Graph


Dual Line Chart
YES
NO
Optional

In most cases, a display Dynamic Prompt


Dynamic Text
YES
YES
Optional
Optional

type icon with red, yellow, Forecast Chart


Interactive Summary and Bar Chart
NO
YES
and green colors indicates Interactive Summary and Scatter Plot YES
Interactive Summary and Targeted Bar Chart YES
that it supports ranges. KPI YES
Line Chart with Reference Lines YES
Needle Plot NO
Pie Chart NO
Range Map YES
Scatter Histogram NO
Scatter Plot YES
Schedule Chart NO
Simple Bar Chart NO
Spark Table YES Optional
Stacked Bar Chart NO
Targeted Bar Chart YES
Tile Chart YES
Vector Plot YES
Waterfall Chart YES
142

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-79

Indicator Display Type Range Notes


Bar Chart with Bullet YES
Bar Chart with Reference Lines YES
Bubble Plot NO
Chart with Slider Prompt NO
Clustered Bar Chart NO
Custom Graph YES Optional
Dual Line Chart NO
Dynamic Prompt YES Optional
Dynamic Text YES Optional
Forecast Chart NO
Interactive Summary and Bar Chart YES
Interactive Summary and Scatter Plot YES
Interactive Summary and Targeted Bar Chart YES
KPI YES
Line Chart with Reference Lines YES
Needle Plot NO
Pie Chart NO
Range Map YES
Scatter Histogram NO
Scatter Plot YES
Schedule Chart NO
Simple Bar Chart NO
Spark Table YES Optional
Stacked Bar Chart NO
Targeted Bar Chart YES
Tile Chart YES
Vector Plot YES
Waterfall Chart YES

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-80 Chapter 6 Creating Dashboards

Spark Table Column Properties


When building a spark table indicator, you can specify
properties for each column.

143

Clicking in the column heading enables you to add and delete columns. You can also move the columns in
a spark table by dragging the column to a new location.

Custom Graph Display and Stored Processes


The custom graph display can display a static graphic file.
A stored process can be used to generate the graphic
image to display.
The stored process runs each
time that the indicator is refreshed.

144

Use the URL from the SAS Stored Process Web Application as the value of the Image URL field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-81

Steps to Create an Indicator


The following are the basic steps to create an indicator:
1. Select the display type that you want to use for the
indicator.
2. Select the indicator data to use with the indicator.
3. If necessary, select the range to use with the indicator.
4. Specify the General properties.
5. Specify the Role Mapping properties.
6. Specify additional properties for the specific display
type.
7. Save the indicator in the desired SAS Folders
metadata location.

145

Demonstration: Indicator
Example: You use a Forecast Chart display to create a
new indicator.

146

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-82 Chapter 6 Creating Dashboards

Demonstration: Indicator
Example: You use a KPI display to create a new
indicator.

147

Demonstration: Indicator
Example: You use an Interactive Summary and
Targeted Bar Chart display to create a
new indicator.

148

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-83

Demonstration: Indicator
Example: You use a Spark Table display to create a
new indicator.

149

Demonstration: Indicator
Example: You use a Custom Graph display to create a
new indicator.

150

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-84 Chapter 6 Creating Dashboards

Exercise: Indicator
Example: You use a Spark Table display to create a
new indicator.

151

Exercise: Indicator
Example: You use a Clustered Bar Chart display
to create a new indicator.

152

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-85

Creating Indicators

In this demonstration, you create several new indicators.


1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS BI Dashboard.
3. Type Eric in the User name field and specify the password provided by your instructor.
4. Click Log On.
5. Select Manage Dashboards to open the Dashboard Designer.
6. Create the IND_BID Sales Forecast indicator.

f. Select File New Indicator.


g. Type IND_BID Sales Forecast in the Name field.
h. Select Forecast Chart as the value for the Display type field.
i. Click Browse next to the Indicator data field.
1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Select DAT_BID Sales Forecast.
3) Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-86 Chapter 6 Creating Dashboards

The Create an Indicator window should resemble the following:

j. Click OK to close the Create an Indicator window.


k. Specify the Role Mapping values in order to display the indicator.
1) Select Year as the value for the X axis value field.
2) Select ACTUAL as the value for the Actual value field.
3) Select FORECAST as the value for the Forecasted value field.
4) Select L95 as the value for the Lower band field.
5) Select U95 as the value for the Upper band field.
6) Type Sales in the Y axis title field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-87

l. Select File Save As.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.
m. Select File Close to close the indicator.
5. Create the IND_BID Sales KPI indicator.

a. Select File New Indicator.


b. Type IND_BID Sales KPI in the Name field.
c. Select KPI as the value for the Display type field.
d. Select Radial Thermometer as the value for the Gauge type field.
e. Click Browse next to the Indicator data field.
1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Select DAT_BID Targeted Sales by Company.

Make sure that you selected the correct object. The classroom image contains an
indicator data object named DAT_Targeted Sales by Company.
3) Click OK.
f. Click Browse next to the Range field.
1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Select RNG_BID Targeted Sales by Company.

Make sure that you selected the correct object. The classroom image contains a range
named RNG_Targeted Sales by Company.
3) Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-88 Chapter 6 Creating Dashboards

The Create an Indicator window should resemble the following:

g. Click OK to close the Create an Indicator window.


h. Set the indicator size.
1) Type 1095 in the Width field.
2) Type 235 in the Height field.
i. Specify the gauge properties for the KPI display.

1) Click (the Edit gauge properties icon) at the top of the Properties window.

2) Type 10 in the Number of columns field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-89

3) Click Close.
j. Specify the Role Mapping values in order to display the indicator.
1) Select sales as the value for the Range Value field.
2) Select salestarget as the value for the Range Value 2 field.
3) Select Company as the value for the KPI title field.

k. Select File Save As.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.
l. Select File Close to close the indicator.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-90 Chapter 6 Creating Dashboards

6. Create the IND_BID Targeted Sales by Company indicator.

a. Select File New Indicator.


b. Type IND_BID Targeted Sales by Company in the Name field.
c. Select Interactive Summary and Targeted Bar Chart as the value for the Display type field.
d. Click Browse next to the Indicator data field.
1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Select DAT_BID Targeted Sales by Company.

Make sure that you select the correct object. The classroom image contains an
indicator data object named DAT_Targeted Sales by Company.
3) Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-91

e. Click Browse next to the Range field.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Select RNG_BID Targeted Sales by Company.

Make sure that you select the correct object. The classroom image contains a range
named RNG_Targeted Sales by Company.
3) Click OK.
The Create an Indicator window should resemble the following:

f. Click OK to close the Create an Indicator window.


g. Specify the Role Mapping values in order to display the indicator.
1) Select sales as the value for the Range Value field.
2) Select salestarget as the value for the Forecast Range Value field.
3) Select Company as the value for the X axis value field.
4) Select sales as the value for the Bar value field.
5) Select salestarget as the value for the Target value field.
6) Type Sales (Thousands) in the Custom label for summary graph field.
7) Select Company as the value for the Summarize by field.
8) Select $123,456 as the value for the Detail axis format field.
9) Select $123,456 as the value for the Summary axis format field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-92 Chapter 6 Creating Dashboards

The Role Mapping should resemble the following:

h. Select File Save As.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.
i. Select File Close to close the indicator.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-93

7. Create the IND_BID Targeted Sales Detail indicator.

a. Select File New Indicator.


b. Type IND_BID Targeted Sales Detail in the Name field.
c. Select Spark Table as the value for the Display type field.
d. Click Browse next to the Indicator data field.
1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Select DAT_BID Targeted Sales by Company.

Make sure that you select the correct object. The classroom image contains an
indicator data object named DAT_Targeted Sales by Company.
3) Click OK.
The Create an Indicator window should resemble the following:

e. Click OK to close the Create an Indicator window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-94 Chapter 6 Creating Dashboards

f. Set the indicator size.


1) Type 430 in the Width field.
2) Type 305 in the Height field.
g. Adjust the table layout.
1) Click the arrow icon in the salestarget column heading in the table and select
Delete column.

2) Click the cost column heading in the table and drag it between Company and profit.
3) Click the sales column heading in the table and drag it between cost and profit.

h. Set the sales column properties.


1) If necessary, select the sales column.
2) Click Browse next to the Range field in the Properties window.
a) If necessary, navigate to Orion Star Marketing Department Dashboards.
b) Select RNG_BID Targeted Sales by Company.

Make sure that you select the correct object. The classroom image contains a
range named RNG_Targeted Sales by Company.
c) Click OK.
3) Select Pointers as the value for the Gauge type field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-95

The sales column properties should resemble the following:

The table should resemble the following:

i. Select File Save As.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.
j. Select File Close to close the indicator.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-96 Chapter 6 Creating Dashboards

8. Create the IND_BID Financial Analysis indicator.

In this example, the graphic results displayed in the Custom Graph display are generated
dynamically as a stored process.
a. Select File New Indicator.
b. Type IND_BID Financial Analysis in the Name field.
c. Select Custom Graph as the value for the Display type field.
The Create an Indicator window should resemble the following:

In this example, you do not select indicator data or a range.

d. Click OK to close the Create an Indicator window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-97

e. Specify the Role Mapping values in order to display the indicator.


1) In the Image URL field, type the URL for the SAS Stored Process Web Application and
specify the name/value information to run the desired stored process and generate the image.
http://sasbap.demo.sas.com:8080/SASStoredProcess/do?_action=form,properties,execute,
nobanner,newwindow&_program=%2FOrion+Star%2FMarketing+Department%2FDas
hboards%2FBID+Financial+Analysis

Follow these steps to determine the correct URL. Use the SAS Stored Process Web
Application.
Log on to the SAS Stored Process Web Application. On the classroom machine,
select Favorites SAS Stored Process Web Application in Internet Explorer.
Use the appropriate credentials to log on.
Select List Available Stored Processes in the lower left corner.
Navigate to the SAS Folders location and select the desired stored process.
Right-click in the displayed results and select Properties.
Copy the complete value in the Address (URL) field. This is the address that
should be used in the Image URL field in the indicator.

The Role Mapping properties should resemble the following:

f. Select File Save As.


1) If necessary, navigate to Orion Star Marketing Department Dashboards.
2) Accept the value for the Name field.
3) Click Save.
9. Click Log Off in the upper right corner to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-98 Chapter 6 Creating Dashboards

Exercises

4. Creating Two New Indicators


a. Log on to SAS BI Dashboard. Use Ellens credentials.
b. Create a new indicator named IND_FT Quantity and Sales by Category.

Property Value

Name IND_FT Quantity and Sales by Category

Display type Spark Table

Indicator Data DAT_FT Sales by Year and Product

Indicator size Property Value

Width 500

Height 110

Role Mapping Property Value

Spark group by Product Category

Spark X axis Year

Column Layout Product Total Total


Category Quantity Sales

(Continued on the next page.)

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.5 Creating Indicators 6-99

Property Value

Total Quantity Column Property Value


Properties
Source Data Total Quantity

Column title Total Quantity by Year

Aggregation function Spark line

Total Sales Column Properties Property Value

Column title Total Sales (all years)

Range RNG_FT Total Sales by Product

Gauge type Button

c. Create a new indicator named IND_FT Sales by Category and Year.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-100 Chapter 6 Creating Dashboards

Property Value

Name IND_FT Sales by Category and Year

Display type Clustered Bar Chart

Indicator Data DAT_FT Sales by Year and Product

Indicator size Property Value

Width 750

Height 300

Role Mapping Property Value

X axis value Year

Cluster group Product Category

Y axis value Total Sales

X axis title <blank space>

d. Log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-101

6.6 Creating Dashboards and Defining Interactions

Objectives
Describe the types of objects that can be added to a
dashboard.
List the ways to control the layout and appearance of
the objects on a dashboard.
Describe the types of object properties that can be set
for each object on a dashboard.
Describe indicator interactions.
List the types of indicator interactions.
Describe the steps to define indicator interactions.

157

Steps to Build a Dashboard (Review)


After you design the dashboard, the following steps are
typical for building the components to implement your
design:
1. Define indicator data .
2. Create a range (if necessary).
3. Create one or more indicators .
4. Create the dashboard and define interactions.
5. Test the dashboard and its corresponding
components.

158
1
5
8

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-102 Chapter 6 Creating Dashboards

What Is a Dashboard?
A dashboard is a container that displays one or more
indicators or static objects. The dashboard can be
displayed in the SAS Information Delivery Portal or in
the SAS BI Dashboard application.

Indicator Static
Label

159
1
5
9

6.13 Poll
Dashboards can contain only a single indicator.
True
False

161

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-103

Adding Objects to a Dashboard


You can add indicators to a dashboard
by dragging them to the dashboard
from the Library section of the Objects
pane.
In addition to adding indicators to a
dashboard, the Static Content section
of the Objects pane enables you to add
labels and images to your dashboard.

163
1
6
3

Dashboard Layout
Because a dashboard is a container for other objects,
there are several ways to control the layout of those
objects including the following:
Alignment Icons on the toolbar enable you to control
Icons the alignment of the dashboard objects.

Layout The Layout property enables


Property you to specify the flow or
exact position for each object.

164
1
6
4

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-104 Chapter 6 Creating Dashboards

Dashboard Appearance
The Font Settings section of the dashboard options
enables you to specify how the text appears in the
various dashboard objects using the Font Settings
properties.

165
1
6
5

Dashboard Objects
After adding objects to the dashboard, you can set the
following types of properties for each object:
Display name

Position within the dashboard

Size of the object

The size of the object


(in percent) if the user chooses
to zoom in on that object
Whether the object should be
displayed in a tile with a title
and a border

166
1
6
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-105

Using Static Labels to Link to Other Content


Static labels can be used to display
information to the user, provide
instructions, and even create a menu
system to link to other content.
Each static label includes properties
to control the link setup
and appearance.
To establish a link,
select the link type
and link target.

167
1
6
7

What Are Indicator Interactions?


When a dashboard contains two or more indicators, you
can choose to have one indicator interact with another.
Indicator interactions enable data highlighting and
filtering.

168

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-106 Chapter 6 Creating Dashboards

Types of Indicator Interactions


There are three types of indicator interactions:
Brush When the dashboard user selects a
specific value in the source indicator,
related values in the target indicator
are highlighted.
Client-Side When the dashboard user selects a
Filter specific value in the source indicator,
data in the target indicator is filtered,
based on the selection.
Server-Side A server-side filter is conceptually the
Filter same as a client-side filter, except that the
parameters are put into the query and the
query is sent to the server for processing.
169

Defining Indicator Interactions


The first indicator (the source) influences a second
indicator (the target). You specify this influence by
mapping a source parameter to a target parameter.
Selecting a dashboard object and clicking (the Set up
interactions icon) on the toolbar opens the Set Up
Indicator Interactions window where you can define the
different types of interactions.

170

Not all indicators support interactions.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-107

6.14 Poll
When defining an interaction between multiple indicators,
you must select the source indicator before opening the
Set Up Indicator Interactions window.
True
False

172

Interaction Example
Example: You want to enable the dashboard user to
view total cases sold and total sales dollars
for a specific year and month.
Dynamic prompts are used to enable the user to
select a year and a month.
A spark table is used to display the total cases and
total sales.
The client-side filter interaction is used to filter the data
in the spark table based on the year and the month
selected by the user.

174

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-108 Chapter 6 Creating Dashboards

Showing Interactions
Clicking the Show interactions check box in the
Dashboard Properties window enables you to see which
dashboard objects interact with other dashboard objects.

175

Interactions Indicator Display Type Interaction Filter Brush


Bar Chart with Bullet YES Source/Target Source/Target

Interactions are Bar Chart with Reference Lines


Bubble Plot
YES
YES
Source/Target
Source/Target
Source/Target
Source/Target
supported by Chart with Slider Prompt YES Source/Target*
Clustered Bar Chart YES Source/Target Source/Target
most of the Custom Graph YES Source/Target Source/Target

indicator Dual Line Chart


Dynamic Prompt
YES
YES
Source/Target
Source/Target
Source/Target

display types. Dynamic Text


Forecast Chart
YES
YES
Target
Source/Target Source/Target
Interactive Summary and Bar Chart NO
Some indicator Interactive Summary and Scatter Plot NO

display types Interactive Summary and Targeted Bar Chart


KPI
NO
YES Source/Target* Source

have limitations Line Chart with Reference Lines


Needle Plot
YES
YES
Source/Target
Source/Target
Source/Target
Source/Target
on the type of Pie Chart YES Source/Target Source/Target
Range Map YES Source/Target Source/Target
interactions that Scatter Histogram YES Source/Target Source/Target

are supported. Scatter Plot


Schedule Chart
YES
YES
Source/Target
Source/Target
Source/Target
Source/Target
Simple Bar Chart YES Source/Target Source/Target
Spark Table YES Source/Target* Source/Target
* See notes under slide. Stacked Bar Chart YES Source/Target Source/Target
Targeted Bar Chart YES Source/Target Source/Target
Tile Chart YES Source/Target Source/Target
Vector Plot YES Source/Target Source/Target
176 Waterfall Chart YES Source/Target Source/Target

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-109

Steps to Create a Dashboard


The following are the basic steps to define a dashboard:
1. Determine the indicators that you want to add to the
dashboard.
2. Create the dashboard and specify the dashboard
properties.
3. Add each indicator and specify the object properties.
4. Establish interactions between indicators.
5. Save the dashboard in the desired SAS Folders
metadata location.

177

Demonstration: Dashboard
Example: You create a dashboard to contain the
indicators created previously.

178

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-110 Chapter 6 Creating Dashboards

Exercise: Dashboard
Example: You create a dashboard to contain the
indicators created previously.

179

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-111

Creating a New Dashboard

In this demonstration, you create a new dashboard.

1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or by selecting
Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS BI Dashboard. The SAS BI Dashboard logon
page appears.
3. Type Eric in the User name field and specify the password provided by your instructor.
4. Click Log On.
5. Select Manage Dashboards to open the Dashboard Designer.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-112 Chapter 6 Creating Dashboards

6. Create the new dashboard.


a. Select File New Dashboard.
b. Type DSH_BID Sales Forecast in the Name field.

c. Click OK.
7. Specify the dashboard properties.
a. Type 1125 in the Width field.
b. Type 775 in the Height field.
8. Add the BID Sales KPI indicator.
a. In the Objects pane, select Indicator as the value of the Show field.

b. In the Objects pane, navigate to Orion Star Marketing Department Dashboards.


c. Drag the IND_BID Sales KPI indicator to the upper left corner of the dashboard.
9. Add the BID Targeted Sales by Company indicator.
a. Drag the IND_BID Targeted Sales by Company indicator from the Objects pane to the
dashboard below the BID Sales KPI indicator.

Be careful to select the correct indicator. On the classroom machine, there is an indicator
named IND_Targeted Sales by Company.
b. Select IND_BID Targeted Sales by Company in the dashboard to set the object properties.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-113

c. Set the object size properties.


1) Type 450 in the Width field.
2) Type 525 in the Height field.
d. Set the object zoom (%) properties.
1) Type 200 in the Width field.
2) Verify that 100 is the value in the Height field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-114 Chapter 6 Creating Dashboards

10. Add the BID Targeted Sales Detail indicator.


a. Drag the IND_BID Targeted Sales Detail indicator from the Objects pane to the dashboard
below the BID Sales KPI indicator and next to the BID Targeted Sales by Company indicator.

Be careful to select the correct indicator. On the classroom machine, there is an indicator
named IND_Targeted Sales Detail.
b. Select IND_BID Targeted Sales Detail in the dashboard to set the object properties.
c. Set the object size properties.
1) Type 400 in the Width field.
2) Type 250 in the Height field.
d. Set the object zoom (%) properties.
1) Type 150 in the Width field.
2) Verify that 100 is the value in the Height field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-115

11. Add the BID Financial Analysis indicator.


a. Drag the IND_BID Financial Analysis indicator from the Objects pane to the dashboard below
the BID Targeted Sales Detail indicator.
b. Select IND_BID Financial Analysis in the dashboard to set the object properties.
c. Set the object size properties.
1) Type 300 in the Width field.
2) Type 250 in the Height field.
d. Set the object zoom (%) properties.
1) Type 200 in the Width field.
2) Type 200 in the Height field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-116 Chapter 6 Creating Dashboards

12. Add the BID Sales Forecast indicator.


a. Drag the IND_BID Sales Forecast indicator from the Objects pane to the dashboard next to the
BID Financial Analysis indicator.
b. Select IND_BID Sales Forecast in the dashboard to set the object properties.
c. Set the object size properties.
1) Type 350 in the Width field.
2) Type 250 in the Height field.
d. Set the object zoom (%) properties.
1) Type 200 in the Width field.
2) Type 200 in the Height field.

13. Save the dashboard.


a. Select File Save As.
b. If necessary, navigate to Orion Star Marketing Department Dashboards.
c. Accept the value for the Name field.
d. Click Save.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-117

14. Test the dashboard. Use the Preview Dashboard functionality.

a. Click (the Preview dashboard icon) on the toolbar.

b. Test the zoom and animation functionality of the IND_BID Targeted Sales by Company
indicator.
1) Click to zoom in.

2) Click to animate the indicator.

3) Click to stop the animation.

4) Click to zoom out.

c. Test the zoom functionality of the IND_BID Targeted Sales Detail indicator.
1) Click to zoom in.

2) Use the scroll bar to view all rows of data.


3) Click to zoom out.

d. Test the zoom functionality of the IND_BID Financial Analysis indicator.


1) Click to zoom in.

2) Click to zoom out.

e. Test the zoom functionality of the IND_BID Sales Forecast indicator.


1) Click to zoom in.

2) Click to zoom out.

f. Click Close in the bottom right corner to close the preview window.
g. Click Log Off in the upper right corner to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-118 Chapter 6 Creating Dashboards

Adding a Menu System to a Dashboard

In this demonstration, you modify the previously created dashboard by adding a menu system.

1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or
by selecting Start All Programs Internet Explorer.
2. From the browser window, select Favorites SAS BI Dashboard. The SAS BI Dashboard logon
page appears.
3. Type Eric in the User name field and specify the password provided by your instructor.
4. Click Log On.
5. Select Manage Dashboards to open the Dashboard Designer.
6. Open the DSH_BID Sales Forecast dashboard.
a. Select File Open Dashboard.
b. Navigate to Orion Star Marketing Department Dashboards.
c. Select DSH_BID Sales Forecast.
d. Click Open.
7. Add five static label objects to the dashboard and specify a link for each.
8. Select the Static Content section of the Objects pane.
9. Drag five static label objects to the open space next to the IND_BID Targeted Sales Detail indicator.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-119

10. Specify the object properties for the first label.


a. Select the first label in the dashboard to set the object properties.
b. Type VIEW ADDITIONAL INFORMATION in the Name field.
c. Set the position properties.
1) Type 860 in the Left field.
2) Type 250 in the Top field.
d. Set the size properties.
Type 250 in the Width field.
e. Set the font options.
1) Select 14 as the font size.
2) Select B to apply bold.
The Object window should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-120 Chapter 6 Creating Dashboards

11. Specify the object properties for the second label.


a. Select the second label in the dashboard to set the object properties.
b. Type Sales by Order Type and Age Group in the Name field.
c. Set the position properties.
1) Type 860 in the Left field.
2) Type 285 in the Top field.
d. Set the size properties.
Type 250 in the Width field.
e. Set the link setup properties.
1) Select SAS Stored Process as the value of the Link type field.
2) Verify that New window is selected as the value for the Link target field.
3) Click Browse next to the Link field.
a) Navigate to Orion Star Marketing Department Stored Processes.
b) Select Sales by Order Type and Age Group.
c) Click OK.
f. Select B to apply bold.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-121

The Object window should resemble the following:

12. Specify the object properties for the third label.


a. Select the third label in the dashboard to set the object properties.
b. Type Orion Star Sales Report in the Name field.
c. Set the position properties.
1) Type 860 in the Left field.
2) Type 315 in the Top field.
d. Set the size properties.
Type 250 in the Width field.
e. Set the link setup properties.
1) Select Web Report as the value of the Link type field.
2) Verify that New window is selected as the value for the Link target field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-122 Chapter 6 Creating Dashboards

3) Click Browse next to the Link field.


a) Navigate to Orion Star Marketing Department Reports.
b) Select Orion Star Sales Report.
c) Click OK.
f. Select B to apply bold.

13. Specify the object properties for the fourth label.


a. Select the fourth label in the dashboard to set the object properties.
b. Type Marketing Dashboard in the Name field.
c. Set the position properties.
1) Type 860 in the Left field.
2) Type 350 in the Top field.
d. Set the size properties.
Type 250 in the Width field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-123

e. Set the link setup properties.


1) Select Dashboard as the value of the Link type field.
2) Click Browse next to the Link field.
a) Navigate to Orion Star Marketing Department Dashboards.
b) Select DSH_Marketing Dashboard.
c) Click OK.
f. Select B to apply bold.

14. Specify the object properties for the fifth label.


a. Select the fifth label in the dashboard to set the object properties.
b. Type SAS BI Training in the Name field.
c. Set the position properties.
1) Type 860 in the Left field.
2) Type 385 in the Top field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-124 Chapter 6 Creating Dashboards

d. Set the size properties.


Type 250 in the Width field.
e. Set the link setup properties.
1) Select External Link as the value of the Link type field.
2) Type http://support.sas.com/bitraining in the Link field.
f. Select B to apply bold.

15. Select File Save to save the dashboard under the same name and replace the previous version.
16. Test the links in the Dashboard Viewer.
a. Select to open the current dashboard in the Dashboard Viewer.

b. Click Sales by Order Type and Age Group.


A new browser window appears and displays the stored process.
c. Select File Exit to close the new browser window and return to the dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-125

d. Click Orion Star Sales Report.


A new browser window appears and displays the report in SAS Web Report Studio.
e. Select File Exit to close the new browser window and return to the dashboard.
f. Click Marketing Dashboard.
The dashboard is displayed in the same Dashboard Viewer window.

When you navigate from one dashboard to another, navigation icons are added to the
upper left corner to enable you to move between dashboards.

g. Click to return to the previous dashboard (or select and the dashboard name).

h. Click SAS BI Training.


A new browser window appears and displays the Web page.
i. Select File Exit to close the new browser window and return to the dashboard.
j. Click Log Off in the upper right corner to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-126 Chapter 6 Creating Dashboards

Adding Dashboard Interactions

In this demonstration, you add dashboard interactions to the dashboard created in a previous
demonstration
1. Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar or
by selecting Start All Programs Internet Explorer.
a. From the browser window, select Favorites SAS BI Dashboard. The SAS BI Dashboard
logon page appears.
b. Type Eric in the User name field and specify the password provided by your instructor.
c. Click Log On.
2. Select Manage Dashboards to open the Dashboard Designer.
3. Open the DSH_BID Sales Forecast dashboard.
a. Select File Open Dashboard.
b. Navigate to Orion Star Marketing Department Dashboards.
c. Select DSH_BID Sales Forecast.
d. Click Open.
4. Define indicator interactions.
a. Select the IND_BID Sales KPI indicator.
b. Select Edit Set Up Interactions.
c. Click the check box for IND_BID Targeted Sales Detail.
d. Select Brush as the value for the Type field.
e. Select Company as the value for the Source Parameter field.
f. Select Company as the value for the Target Parameter field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.6 Creating Dashboards and Defining Interactions 6-127

The Set Up Indicator Interactions window should resemble the following:

g. Click OK.
5. Select File Save to save the dashboard under the same name and replace the previous version.
6. Select View Go to Dashboard Viewer and test the dashboard.
7. Click on a gauge in the IND_BID Sales Forecast indicator and verify that the corresponding row in
the IND_BID Targeted Sales Detail indicator is highlighted.

8. Select Log Off to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-128 Chapter 6 Creating Dashboards

Exercises

5. Creating a New Dashboard

a. Log on to SAS BI Dashboard. Use Ellens credentials.


b. Create a new dashboard named DSH_FT Sales by Year and Product.
c. Add the IND_FT Quantity and Sales by Category indicator.
d. Add the IND_FT Sales by Category and Year indicator.
Set the zoom height to 150.
e. Save the new dashboard in the Orion Star Sales Department Dashboards location.
f. Test the dashboard in the Dashboard Viewer.
g. Log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-129

6.7 Solutions

Solutions to Exercises
1. Creating a New Information Map to be Used as a Data Source in SAS BI Dashboard
a. Log on to SAS Information Map Studio. Use Ellens credentials.
1) Select Start All Programs SAS SAS Information Map Studio 4.2.
2) Verify that the connection profile is My Server and click OK.
3) Type Ellen in the User ID field and type the password provided by the instructor.
4) Click OK.
5) If necessary, click OK to close the Create an Information Map window.
b. Create data items from several columns of the FT US Customer table in the FT Library.
1) If necessary, click to expand the Resources pane.

2) Click (the Application Servers tab) in the Resources pane.

3) Click to expand the FT Library.

4) Double-click the FT US Customer Subset table to add it to the Selected Resources list box of
the Design tab.
5) Click to hide the Resources pane.

6) Click to expand the FT Library.

7) Click to expand the FT US Customer Subset table and display the physical column
names.
8) Double-click the following columns to create new data items from them:
CostPrice_Per_Unit
Product_Category
Quantity
Total_Retail_Price
9) Change the properties for Costprice Per Unit.
a) Double-click Costprice Per Unit.
b) Type Total Cost in the Data item name field.
c) Click Classification, Aggregations, Formats in the selection list box.
d) Select DOLLAR as the value of the Format name field.
e) Type 14 in the Valid width range field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-130 Chapter 6 Creating Dashboards

f) Type 0 in the Valid decimal range field.


g) Click OK to close the Data Item Properties window.
10) Change the properties for Product Category.
a) Double-click Product Category.
b) Click Value-Generation Method in the selection list box.
c) Click the User selects value from a dynamic list radio button.
d) Click OK to close the Data Item Properties window.
11) Change the properties for Quantity.
a) Double-click Quantity.
b) Type Total Quantity in the Data item name field.
c) Click Classification, Aggregations, Formats in the selection list box.
d) Select COMMA as the value of the Format name field.
e) Type 12 in the Valid width range field.
f) Type 0 in the Valid decimal range field.
g) Click OK to close the Data Item Properties window.
12) Change the properties for Total Retail Price.
a) Double-click Total Retail Price.
b) Type Total Sales in the Data item name field.
c) Click Classification, Aggregations, Formats in the selection list.
d) Select DOLLAR as the value of the Format name field.
e) Type 14 in the Valid width range field.
f) Type 0 in the Valid decimal range field.
g) Click OK to close the Data Item Properties window.
c. Create a new data item named Year that is calculated by extracting the year from the order date.
1) Select Insert New Data Item.
2) Type Year in the Data item name field.
3) Click Edit to assign the expression that will populate the new data item.
4) Double-click the Date and Time folder on the Functions tab to expand it.
5) Double-click YEAR(date) to add the function to the expression.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-131

6) Select the Data Sources tab.


7) Double-click Physical Data to expand the category.
8) Double-click FT US Customer Subset to expand the table.
9) Double-click Order_Date to add it to the expression.

10) Click Validate Expression.


11) Click OK to close the Valid Expression Text window.
12) Click OK to close the Expression Editor.
13) Select Classifications, Aggregations, Formats in the selection list box on the left side of the
Data Item Properties window.
14) Select Numeric as the value for the Format type field.
15) Select F as the value for the Format name field.
16) Type 4 in the Valid width range field.
17) Click OK to close the Data Item Properties window.
The information map should resemble the following:

d. Test the information map.


1) Select Tools Run a Test Query (or select on the toolbar).

2) Click to add all of the data items to the query.

3) Rearrange the data items to list Year first and then Product Category and the three measures.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-132 Chapter 6 Creating Dashboards

4) Accept the default output options and click Run Test.

5) Click Close to close the View Query window.


6) Click Close to close the Results window.
7) Click Close to close the Test the Information Map window.
e. Save the information map as FT Yearly Sales by Product Group in Orion Star
Sales Department Dashboards and close SAS Information Map Studio.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Dashboards.
3) Type FT Yearly Sales by Product Group in the Name field.
4) Click Save.
5) Select File Exit to close SAS Information Map Studio.
2. Creating a New Indicator Data Object Using the New Information Map as the Data Source
a. Log on to SAS BI Dashboard. Use Ellens credentials.
1) Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar
or by selecting Start All Programs Internet Explorer.
2) From the browser window, select Favorites SAS BI Dashboard.
The SAS BI Dashboard logon page appears.
3) Type Ellen in the User name field and specify the password provided by your instructor.
4) Click Log On.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-133

b. Create a new indicator data object named DAT_FT Sales by Year and Product.
1) Select Manage Dashboards to open the Dashboard Designer.
2) Select File New Indicator Data.
3) Type DAT_FT Sales by Year and Product in the Name field.
4) Click OK.
5) Select Information map as the value for the Data source field.
6) Click Browse next to the Information map field.
7) Navigate to Orion Star Sales Department Dashboards.
8) Select FT Yearly Sales by Product Group.
9) Click OK.
The indicator data object should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-134 Chapter 6 Creating Dashboards

10) Select the Query Results tab to view the columns and rows returned by the query.

c. Save the new indicator data object in the Orion Star Sales Department Dashboards
location and log off from SAS BI Dashboard.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Dashboards.
3) Accept the value for the Name field.
4) Click Save.
5) Select File Close to close the indicator data.
6) Click Log Off in the upper right corner to log off from SAS BI Dashboard.
3. Creating a New Range
a. Log on to SAS BI Dashboard. Use Ellens credentials.
1) Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar
or by selecting Start All Programs Internet Explorer.
2) From the browser window, select Favorites SAS BI Dashboard.
The SAS BI Dashboard logon page appears.
3) Type Ellen in the User name field and specify the password provided by your instructor.
4) Click Log On.
b. Create a new range named RNG_FT Total Sales by Product.
1) Select Manage Dashboards to open the Dashboard Designer.
2) Select File New Range.
3) Type RNG_FT Total Sales by Product in the Name field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-135

4) Click Add Interval.


5) Type 75,000 in the Upper bound field.
6) Click OK.
7) Click Add Interval.
8) Type 100,000 in the Upper bound field.
9) Click OK.
10) Click Add Interval.
11) Type 1500,000 in the Upper bound field.
12) Click OK.
13) Click Add Interval.
14) Type 200,000 in the Upper bound field.
15) Click OK.
16) Click Add Interval.
17) Type 250,000 in the Upper bound field.
18) Click OK.
19) Change the attributes for the < 75,000 interval.
Click in the Label column and type Low.
20) Change the attributes for the >= 75,000 and < 100,000 interval.
a) Select On Target as the value for the Code Interval field.
b) Click in the Label column and type Average.
21) Change the attributes for the >= 100,000 and < 150,000 interval.
a) Select Above Target as the value for the Code Interval field.
b) Click in the Label column and type High.
22) Change the attributes for the >= 150,000 and < 200,000 interval.
Click in the Label column and type Low.
23) Change the attributes for the >= 200,000 and < 250,000 interval.
a) Select On Target as the value for the Code Interval field.
b) Click in the Label column and type Average.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-136 Chapter 6 Creating Dashboards

24) Change the attributes for the >= 250,000 interval.


a) Select Above Target as the value for the Code Interval field.
b) Click in the Label column and type High.
The updated list of intervals and their attributes should resemble the following:

c. Save the new range in the Orion Star Sales Department Dashboards location and log off
from SAS BI Dashboard.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Dashboards.
3) Accept the value for the Name field.
4) Click Save.
5) Select File Close to close the indicator data.
6) Click Log Off in the upper right corner to log off from SAS BI Dashboard.
4. Creating Two New Indicators
a. Log on to SAS BI Dashboard. Use Ellens credentials.
1) Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar
or by selecting Start All Programs Internet Explorer.
2) From the browser window, select Favorites SAS BI Dashboard.
The SAS BI Dashboard logon page appears.
3) Type Ellen in the User name field and specify the password provided by your instructor.
4) Click Log On.
b. Create a new indicator named IND_FT Quantity and Sales by Category.
1) Select Manage Dashboards to open the Dashboard Designer.
2) Select File New Indicator.
3) Type IND_FT Quantity and Sales by Category in the Name field.
4) Select Spark Table as the value for the Display type field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-137

5) Click Browse next to the Indicator data field.


a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Select DAT_FT Sales by Year and Product.
c) Click OK.

6) Click OK.
7) Set the indicator size.
a) Type 500 in the Width field.
b) Type 110 in the Height field.
8) Specify the Role Mapping values in order to display the indicator.
a) Select Spark group by as the value for the Product Category field.
b) Select Spark X axis as the value for the Year field.
9) Specify the column layout.
a) Click the arrow in the Total Cost column and select Delete column.
b) Click the Total Sales column and drag it to the end of the table.
c) Click the arrow in the Year column and select Delete column.
10) Specify the Total Quantity column properties.
a) Click the Total Quantity column to select it.
b) Type Total Quantity by Year in the Column title field.
c) Select Spark line as the value for the Aggregate function field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-138 Chapter 6 Creating Dashboards

11) Specify the Total Sales column properties.


a) Click the Total Sales column to select it.
b) Type Total Sales (all years) in the Column title field.
c) Click Browse next to the Range field.
(1) If necessary, navigate to Orion Star Sales Department Dashboards.
(2) Select RNG_FT Total Sales by Product.
(3) Click OK.
d) Select Button as the value for the Gauge type field.
12) Save the new indictor in the Orion Star Sales Department Dashboards location and
log off from SAS BI Dashboard.
a) Select File Save As.
b) Navigate to Orion Star Sales Department Dashboards.
c) Accept the value for the Name field.
d) Click Save.
e) Select File Close to close the indicator data.
c. Create a new indicator named IND_FT Sales by Category and Year.
1) Select File New Indicator.
2) Type IND_ FT Sales by Category and Year in the Name field.
3) Select Clustered Bar Chart as the value for the Display type field.
4) Click Browse next to the Indicator data field.
a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Select DAT_FT Sales by Year and Product.
c) Click OK.
5) Set the indicator size.
a) Type 750 in the Width field.
b) Type 300 in the Height field.
6) Select Year as the value for the X axis value field.
7) Select Product Category as the value for the Cluster group field.
8) Select Total Sales as the value for the Y axis value field.
9) Type a blank space as the value for the X axis title.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-139

10) Save the new indictor in the Orion Star Sales Department Dashboards location and
log off from SAS BI Dashboard.
a) Select File Save As.
b) Navigate to Orion Star Sales Department Dashboards.
c) Accept the value for the Name field.
d) Click Save.
e) Select File Close to close the indicator data.
d. Click Log Off in the upper right corner to log off from SAS BI Dashboard.
5. Creating a New Dashboard
a. Log on to SAS BI Dashboard. Use Ellens credentials.
1) Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar
or by selecting Start All Programs Internet Explorer.
2) From the browser window, select Favorites SAS BI Dashboard.
The SAS BI Dashboard logon page appears.
3) Type Ellen in the User name field and specify the password provided by your instructor.
4) Click Log On.
b. Create a new dashboard named DSH_FT Sales by Year and Product.
1) Select Manage Dashboards to open the Dashboard Designer.
2) Select File New Range.
3) Type DSH_FT Sales by Year and Product in the Name field.
4) Click OK.
5) Specify the Dashboard properties.
a) Type 550 in the Width field.
b) Type 425 in the Height field.
c. Add the IND_FT Quantity and Sales by Category indicator.
1) In the Objects pane, select Indicators as the value for the Show field.

2) In the Objects pane, navigate to Orion Star Sales Department Dashboards.


3) Drag the IND_FT Quantity and Sales by Category indicator to the upper left corner of the
dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-140 Chapter 6 Creating Dashboards

d. Add the IND_FT Sales by Category and Year indicator.


1) In the Objects pane, navigate to Orion Star Sales Department Dashboards.
2) Drag the IND_FT Sales by Category and Year indicator below the other indicator.
3) Select IND_FT Sales by Category and Year to make it active.
4) Type 150 as the value for the zoom height.

e. Save the new dashboard in the Orion Star Sales Department Dashboards location.
1) Select File Save As.
2) Navigate to Orion Star Sales Department Dashboards.
3) Accept the value for the Name field.
4) Click Save.
f. Select View Go to Dashboard Viewer to test the dashboard.
g. Click Log Off in the upper right corner to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-141

Solutions to Student Activities (Polls/Quizzes)

6.03 Quiz Correct Answer


What is the difference between an indicator data object
and an indicator object?

Indicator data objects retrieve data for an indicator.


Indicators define the display settings and other
properties for visually displaying information
in a dashboard.

19

6.04 Poll Correct Answer


Both the Dashboard Viewer and SAS BI Dashboard
portlet enable you to create dashboard components.
Yes
No

You can only create dashboard components using


the Dashboard Designer. If you have the necessary
permissions, you might be able to access the
Dashboard Designer from both the Dashboard Viewer
and the SAS BI Dashboard portlet.

23

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-142 Chapter 6 Creating Dashboards

6.05 Multiple Answer Poll Correct Answers


Assuming that the indicator supports each of the
following, which of these can be accomplished in the
SAS BI Dashboard portlet?
a. Access dashboard favorites
b. Add comments to an indicator
c. Print an indicator
d. View indicator tooltips
e. Zoom in on an indicator

31

6.06 Multiple Choice Poll Correct Answer


Which of the following situations explains why the
Manage Dashboards link is not available in the
Dashboard Viewer?
a. The SAS BI Dashboard application is not installed.
b. You do not have the necessary permission to create
dashboards.
c. The Manage Dashboards link is available only in the
SAS BI Dashboard portlet in the portal.
d. The Dashboard Viewer does not provide a way to
access the Dashboard Designer.

50

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-143

6.07 Multiple Answer Poll Correct Answers


Which of the following are valid data sources for an
indicator data object?
a. Information map
b. OLAP cube
c. SAS report
d. SQL query
e. Stored process
f. Table

70

6.09 Poll Correct Answer


The WHERE clause is used to select columns.
True
False

The SELECT statement is used to select columns.


The WHERE clause is used to subset rows.

92

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-144 Chapter 6 Creating Dashboards

6.10 Poll Correct Answer


Is it possible to have multiple interval ranges with the
same Code Interval value?
Yes
No

Multiple interval ranges can have the same Code


Interval value. The Label and Color fields can then be
used to differentiate between the different interval
ranges.

110

6.11 Multiple Answer Poll Correct Answers


Which of the following properties are required when you
create a new indicator?
a. Name
b. Description
c. Display Type
d. Indicator Data
e. Range

123

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6.7 Solutions 6-145

6.12 Quiz Correct Answer


What is the difference between the simple bar chart
display type, with all blue bars, and the targeted bar chart
that shows different colored bars?
The simple bar chart does not support ranges; the
targeted bar chart does.
When you select a display type in SAS BI
Dashboard, the
display types
with red, yellow,
and green colors
indicate that the
display supports
ranges.
138

6.13 Poll Correct Answer


Dashboards can contain only a single indicator.
True
False

Dashboards can display multiple indicators


and static objects.

162

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6-146 Chapter 6 Creating Dashboards

6.14 Poll Correct Answer


When defining an interaction between multiple indicators,
you must select the source indicator before opening the
Set Up Indicator Interactions window.
True
False

173

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 7 Building a Business User
Reporting Application

7.1 Building a Business User Reporting Application ........................................................ 7-3


Exercises ................................................................................................................................ 7-8

7.2 Solutions to Exercises ................................................................................................. 7-34

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-2 Chapter 7 Building a Business User Reporting Application

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-3

7.1 Building a Business User Reporting Application

Case Study
You were assigned the task of building the dashboard for
the Sales Department manager of Italy and Spain.
In addition to the dashboard, you need to build the data
sources for the dashboard. The data sources include a
new SAS table, an OLAP cube, two information maps, a
stored process, and several SAS Web Report Studio
reports.

2
2

SAS Data Integration Studio


Use SAS Data Integration Studio to build a job to extract
and transform data from five source tables. Load that
information into a new target table that you can use for
reporting and analysis.

3
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-4 Chapter 7 Building a Business User Reporting Application

Creating an OLAP Cube


Use the Cube Designer Wizard from SAS Data Integration
Studio to build a new cube with three dimensions.

4
4

SAS Information Map Studio


Use SAS Information Map Studio to build two information
maps. One from the target table and the other from the
OLAP cube.

5
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-5

SAS Enterprise Guide


Use SAS Enterprise Guide to read data, prompt the user
to select a value, and create a graphical report.

You then turn the


complete project into a
stored process that will be
used in SAS BI Dashboard
with a Custom Graph
indicator.

6
6

SAS Web Report Studio


Use SAS Web Report Studio to create a report with three
separate sections.

7
7 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-6 Chapter 7 Building a Business User Reporting Application

SAS Web Report Studio


Use SAS Web Report Studio to create a report with three
separate sections.

8
8 continued...

SAS Web Report Studio


Use SAS Web Report Studio to create a report with three
separate sections.

9
9

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-7

SAS BI Dashboard
Use SAS BI Dashboard to create a dashboard with three
indicators.

10
1
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-8 Chapter 7 Building a Business User Reporting Application

Exercises

1. Creating a New SAS Data Integration Studio Job

a. Log on to SAS Data Integration Studio. Using Ellens credentials.


b. Create a new job named FT Orders Italy and Spain and store it in Orion Star
Sales Department Jobs.
c. Define a new library named FT Case Study Library and store it in Orion Star
Sales Department Data.
Select SAS BASE Library.
Select the SASAPP server.
Specify FTCS as the value of the Libref field.
Select S:\Workshop\sbaft43 as the path.
Hint: This path is already defined so you can select it in the Available item list box.
d. Register tables in the new library.
Select the following tables:
FT_CUSTOMERS
FT_GEOGRAPHY
FT_ORDERS
FT_PRODUCTS
FT_TIME
e. Add the five new source tables to the job.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-9

f. Add an SQL Join transformation to the job and connect the five source tables to the
transformation.
g. Add the Table Loader transformation to the job and connect it to the SQL Join transformation.
h. Create a new target table named FT Orders Italy and Spain and store it in Orion Star
Sales Department Data.
Select SAS as the DBMS.
Store the table in the FT Case Study Library.
Add all of the columns from the following tables:
FT_CUSTOMERS
FT_GEOGRAPHY
FT_ORDERS
FT_PRODUCTS
FT_TIME
i. Add the target table to the job and connect it to the Table Loader transformation.
j. Modify the join criteria in the SQL Transformation.

Hint: Create the final part of the join criteria using the IN (,) operator and this operand,
("IT","ES"), to subset the data to only include orders for Italy and Spain.

k. Click to run the job and create the new table.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-10 Chapter 7 Building a Business User Reporting Application

l. Open the new table and verify the data.

There should be 28,096 rows of data.

m. Save the job and close the job window.


2. Creating a New Cube
a. Using SAS Data Integration Studio, create a new cube named FT Order Cube Italy and Spain
and store it in Orion Star Sales Department Data.

b. Select File New Cube to begin building a new OLAP cube.


c. Specify the general properties.

Property Value

Name FT Order Cube Italy and Spain

Location Orion Star Sales Department Data

Physical cube path S:\Workshop\sbaft43

Input type Detail table

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-11

d. Select the FT Orders Italy and Spain table from the FT Case Study Library as both the input
table and drill-through table.
e. Define the Time dimension.

Name Time

Caption Time Dimension

Type TIME

Levels/Hierarchies Add the YMD and YQM supplied time hierarchies using
Order_Date as the input column

Default Hierarchy YMD

f. Define the Customer dimension.

Name Customer

Caption Customer Dimension

Type STANDARD

Levels Customer_Age_Group
Customer_Type
Customer_Gender

Hierarchy 1 Name AgeGroup_Type_Gender

Caption Age Group, Type, Gender Hierarchy

Levels Customer_Age_Group
Customer_Type
Customer_Gender

Hierarchy 2 Name Type_AgeGroup_Gender

Caption Type, Age Group, Gender Hierarchy

Levels Customer_Type
Customer_Age_Group
Customer_Gender

Default AgeGroup_Type_Gender
Hierarchy

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-12 Chapter 7 Building a Business User Reporting Application

g. Define the Product dimension.

Name Product

Caption Product Dimension

Type STANDARD

Levels Product_Line
Product_Category
Product_Group

Hierarchy Name Product

Caption Product Hierarchy

Levels Product_Line
Product_Category
Product_Group

h. Select the measures and specify the measure format.

Column Statistics Format

CostPrice_Per_Unit Sum DOLLAR14.


Average DOLLAR14.

Quantity Sum COMMA12.


Average COMMA12.

Total_Retail_Price Sum DOLLAR14.


Average DOLLAR14.

No member properties are needed for this cube.

i. Add an aggregation.

Name C1T1

Members Customer_Age_Group
Year

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-13

j. Build the cube and verify that it was created successfully.

k. Close SAS Data Integration Studio.


3. Creating Two New Information Maps
a. Log on to SAS Information Map Studio. Use Ellens credentials.
b. Create a new information map from the FT Orders Italy and Spain table in the FT Case Study
Library.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-14 Chapter 7 Building a Business User Reporting Application

c. Create data items from the following physical columns:


CostPrice_Per_Unit
Customer_Age_Group
Customer_Contry
Customer_Gender
Month_Name
Order_Date
Product_Group
Quantity
Supplier_Country
Total_Retail_Price
Year_ID
1) Specify the DOLLAR14. format for Cost Price Per Unit and Total Retail Price For This
Product.
2) Specify the COMMA12. format for Quantity Ordered.
3) Specify the dynamic value-generation method for the following data items:
Customer Age Group
Customer Country
Product Group
Supplier Country
Year
4) Specify the static list value-generation method and get all values for the following data items:
Customer Gender
Month Name
5) Create a new prompted filter named Order Date Selector. Use Date Order Was Placed by
Customer.
Hint: Create this filter as a date range filter.
6) Create a new prompted filter named Year Month Selector. Use Year and Month Name.
Hint: Enable the user to select all months and make that choice the default selection.
7) Save FT Orders Map Italy and Spain in Orion Star Sales Department Information
Maps.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-15

d. Create a new information map from the FT Order Cube Italy and Spain.

Create data items from all of the hierarchies and measures.


Save the FT Order Cube Map Italy and Spain in Orion Star Sales Department
Information Maps.
e. Close SAS Information Map Studio.
4. Creating a New SAS Enterprise Guide Project and New Stored Processes
a. Open SAS Enterprise Guide. If necessary, change the connection profile to use Ellen.
b. Add the FT Orders Italy and Spain table from Orion Star Sales Department Data to the
project.
c. Use the Query Builder to select a subset of the rows from FT Orders Italy and Spain.
Select all of the columns.
Create a new prompt using the following attributes:

Field Value

Name Country

Displayed text Select a Country

Options Requires a non-blank value

Method for populating prompt Static list, get all values from the Country column of the
table in the project.
Add All possible values and set it as the default.
Create a basic filter in the Query Builder using the Customer_Country variable and the new
prompt.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-16 Chapter 7 Building a Business User Reporting Application

d. Use the Bar-Line Chart task to create the following report:

Assign the roles as indicated below.

Role Columns

Column to Chart Product_Group

Bar sum of Quantity

Line sum of CostPrice_Per_Unit


Total_Retail_Price

Stack Country

Hint: After assigning the columns to the roles, right-click to specify the following properties:

Column Property Value

Quantity Format COMMA12.

CostPrice_Per_Unit Label Total Cost


Format DOLLAR14.

Total_Retail_Price Label Total Retail Price


Format DOLLAR14.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-17

Specify these additional properties:

Category Property Value

Bars Custom Select a light blue for the first color in the first row.
Colors
Select a light yellow for the second color in the first row.

Horizontal Axis Label <blank space>

Vertical Axis Label Total Quantity

Vertical Right Axis Label <blank space>

Line Legend Font size 9 pt

Titles Graph Order Analysis by Product Group


Footnote <clear default>

e. Create a stored process from the project.

Attribute Value

Name FT Order Analysis by Product Group

Location Orion Star Sales Department Dashboards

SAS Code (add to top) goptions gsfname=_webout gsfmode=replace;


goptions device=png;

Do not include the stored process macros.


Hint: Select Include code for and clear the check box for Stored
process macros.

Execution Server SASApp - Logical Stored Process Server

Source filepath S:\Workshop\sbaft43

SAS Result Types Streaming only

f. Save the project as FT Stored Process for Dashboard in S:\Workshop\sbaft43 and close
SAS Enterprise Guide.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-18 Chapter 7 Building a Business User Reporting Application

5. Creating a New Multi-Section Report in SAS Web Report Studio


a. Log on to SAS Web Report Studio. Use Ellens credentials.
b. Create the first report section.

Use the FT Order Cube Italy and Spain OLAP cube from Orion Star Sales
Department Data as the data source.
Select the following data items from the data source: Age Group, Type, Gender Hierarchy,
Product Hierarchy, Ymd, Sum Of Quantity, Sum Of Total Retail Price
Save the report as FT Sales Analysis in Orion Star Sales Department Reports.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-19

Object Property Value

Report header Banner image Orion Star Report Header

Text Property Value

Font size 14

Font face Bold

Justification Center

Text color Blue

Text Sales Analysis - Italy and Spain

Crosstab Data assignment

Totals Visual column totals on bottom


Hint: Right-click the crosstab and select Total.

Bar chart Data assignment

Properties Graph size: Fixed size

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-20 Chapter 7 Building a Business User Reporting Application

Pie Chart Data assignment

Properties Graph size: Fixed size


Legend position: Right

Report footer Banner image Orion Star Report Footer

Left content Property Value

Width 33

Content Text

Font size 8

Text REPORT:

Dynamic text Report Name

Middle content Property Value

Width 34

Content Text

Font size 8

Text DATA SOURCE NAME:

Dynamic text Data Source Name

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-21

Right content Property Value

Width 33

Content Text

Font size 8

Text REPORT AUTHOR:

Dynamic text Report Author

Include a horizontal line between the footer and report content.


Set up the report grid to resemble the following:

View the report.


Expand 2007 in the crosstab.
Resize each chart to fit under the expanded table.
Name the first section Sales Analysis.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-22 Chapter 7 Building a Business User Reporting Application

c. Create the second report section.

Create this report by inserting a new report section named Customer Analysis and copying the
header and footer from the first section but specifying new data.
Update the report header text to Customer Analysis - Italy and Spain.
Use the FT Orders Map Italy and Spain information map from Orion Star
Sales Department Information Maps as the data source.
Select the following data items from the data source: Customer Country, Customer Age
Group, Customer Gender, Quantity Ordered, Cost Price Per Unit, and Total Retail Price
For This Product.
Rename Quantity Ordered to Total Quantity.
Rename Cost Price Per Unit to Total Cost.
Rename Total Retail Price For This Product to Total Retail Price.
Add the Order Date Selector filter from the information map as a section filter.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-23

Object Property Value

Tile chart Data assignment

Properties Size: Custom


Tile layout type: Flow

Bar-line chart Data assignment

Properties Graph size: Fixed size

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-24 Chapter 7 Building a Business User Reporting Application

Crosstab Data assignment

Conditional 1st Rule:


Highlighting Total Retail Price greater than 200,000
Condition: Font background color: light green
2nd Rule:
Total Retail Price between 100,000 and 200,000
Condition: Font background color: light yellow
1st Rule:
Total Retail Price less than 100,000
Condition: Font background color: light red
Set up the report grid to resemble the following:

View the report.


Select January 1, 2004 through December 31, 2006 as the prompt value.
Resize the table columns so that the text fits on one line.
Resize the tile chart to be the same width as the crosstab and half of the height of the bar-
line chart.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-25

d. Create the third report section.

Create this report by inserting a new report section named Product Analysis and copying the
header and footer from the first section and the data from the Customer Analysis section.
Update the report header text to Product Analysis - Italy and Spain.
Remove the Customer Age Group and Customer Gender data items and add Product Group
and Supplier Country.
Add the Year Month Selector filter from the information map as a section filter.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-26 Chapter 7 Building a Business User Reporting Application

Object Property Value

Line chart Data assignment

Properties Graph size: Fixed size

Crosstab Data assignment

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-27

Pie chart Data assignment

Properties Graph size: Fixed size


Set up the report grid to resemble the following:

View the report.


When you are prompted, select 2007 for the year and all possible values for the month.
Resize the report objects as desired.
e. Log Off SAS Web Report Studio and close the Web browser.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-28 Chapter 7 Building a Business User Reporting Application

6. Building the FT Sales Analysis Italy and Spain Dashboard

a. Log on to SAS BI Dashboard. Use Ellens credentials.


b. Create a new indicator data item named DAT_FT Sales Analysis for Italy and Spain.
Use the following SQL query as the data source:
select * from sasdata.profitCompanyTarget
where company in ('Orion Italy','Orion Spain')
Verify that the values on the Query Results tab match the following:

Save the new indicator data item in the Orion Star Sales Department Dashboards
location.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-29

c. Create a new indicator data item named DAT_FT Shoe Suppliers.


Select the FT_PRODUCTS table from the FT Case Study Library as the data source.
Select the following data items and assign them to the roles indicated:

Column Name Summary Group By <Include in Query>

Product_ID COUNT
Product_Group
Supplier_Country
Filter the data using the following criteria:
(product_group contains "Tracker" or product_group contains
"Eclipse") and supplier_country not in("US","GB")
Verify that the values on the Query Results tab match the following:

Save the new indicator data item in the Orion Star Sales Department Dashboards
location.
d. Create a new range named RNG_FT Sales by Company.
Create ranges for the following intervals and set the values for the interval attributes:.

Range Code Interval Label Color

<5,000 Below Target Below Target Red

>=5,000 and < 10,000 On Target On Target Yellow

>=10,000 Above Target Above Target Green


Save the new range in the Orion Star Sales Department Dashboards location.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-30 Chapter 7 Building a Business User Reporting Application

e. Create a new indicator named IND_FT Sales Target Analysis.

Name IND_FT Sales Target Analysis

Display type Bar Chart With Bullet

Indicator data Orion Star Sales Department Dashboards DAT_FT Sales


Analysis for Italy and Spain

Range Orion Star Sales Department Dashboards RNG_FT Sales by


Company

Role Mapping Property Value

Range Value sales

X axis value Company

Bar value salestarget

Bullet value sales

X axis title <blank space>

Y axis title Sales

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-31

f. Create a new indicator named IND_FT Shoe Supplier Analysis.

Name IND_FT Shoe Supplier Analysis

Display type Clustered Bar Chart

Indicator data Orion Star Sales Department Dashboards DAT_FT Shoe


Suppliers

General Properties Width: 475


Height: 300

Role Mapping Property Value

X axis value Product_Group

Cluster group Supplier_Country

Y axis value Product_ID

X axis title <blank space>

Y axis title Product Count

X axis labels Stagger

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-32 Chapter 7 Building a Business User Reporting Application

g. Create a new indicator named IND_FT Order Analysis by Product Group.

Name IND_FT Order Analysis by Product Group

Display type Custom Graph

General Width: 600


Properties
Height: 500

Role Mapping Image URL:


http://sasbap.demo.sas.com:8080/SASStoredProcess/
do?_program=%2FOrion+Star%2FSales+Department%2FDashboards
%2FFT+Order+Analysis+by+Product+Group

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.1 Building a Business User Reporting Application 7-33

h. Create a new dashboard named DSH_FT Sales Analysis Italy and Spain.
Dashboard properties

Object Property Value

Width 850

Height 550
Add the IND_FT Order Analysis by Product Group indicator in the top left corner.

Object Property Value

Size: Width 500


Height 500

Zoom: Width 175


Height 100
Add the IND_FT Sales Target Analysis indicator next to the FT Order Analysis by Product
Group indicator.

Object Property Value

Size: Width 300


Height 225

Zoom: Width 150


Height 150
Add the IND_FT Shoe Supplier Analysis indicator next to the FT Order Analysis by Product
Group indicator and below the FT Sales Target Analysis indicator.

Object Property Value

Size: Width 300


Height 250

Zoom: Width 150


Height 150

i. Test the dashboard in the Dashboard Viewer.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-34 Chapter 7 Building a Business User Reporting Application

7.2 Solutions to Exercises


1. Creating a New SAS Data Integration Studio Job
a. Log on to SAS Data Integration Studio. Use Ellens credentials.
1) Select Start All Programs SAS SAS Data Integration Studio 4.2.
2) Verify that the connection profile is My Server.
3) Click OK to close the Connection Profile window and access the Log On window.
4) Type Ellen in the User ID field and specify the password provided by your instructor.
5) Click OK to close the Log On window and log on.
b. Create a new job named FT Orders Italy and Spain and store it in Orion Star
Sales Department Jobs.
1) Select File New Job.
2) Type FT Orders Italy and Spain in the Name field.
a) If necessary, click Browse next to the Location field.
b) Navigate to SAS Folders Orion Star Sales Department Jobs.
3) Click OK to close the Select a Location window.
4) Click OK to close the New Job window.
c. Define a new library named FT Case Study Library and store it in Orion Star
Sales Department Data.
1) Select File New Library.
2) Select SAS BASE Library as the type of library to define.
3) Click Next.
4) Type FT Case Study Library in the Name field.
5) Click Browse next to the Location field.
a) Navigate to SAS Folders Orion Star Sales Department Data.
b) Click OK to close the Select a Location window.
6) Click Next.
7) Double-click SASApp to move it to the Selected servers list box.
8) Click Next.
9) Type FTCS in the Libref field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-35

10) Double-click S:\Workshop\sbaft43 in the Available items list box to move it to the Selected
items list box.
11) Click Next.
12) Click Finish.
d. Register tables in the new library.
1) In the Folders tab, expand the Orion Star, Sales Department, and Data folders.
2) Right-click FT Case Study Library and select Register Tables.
3) Verify the library information and click Next.
4) Select the following tables:
FT_CUSTOMERS
FT_GEOGRAPHY
FT_ORDERS
FT_PRODUCTS
FT_TIME
5) Click Next.
6) Click Finish.
e. Add the five new source tables to the job.
1) Using the Folders tab, navigate to Orion Star Sales Department Data.
2) Drag each of the following tables from the Folders tab to the new job:
FT_CUSTOMERS
FT_GEOGRAPHY
FT_ORDERS
FT_PRODUCTS
FT_TIME
f. Add an SQL Join transformation to the job and connect the five source tables to the
transformation.
1) Click the Transformations tab.
2) Expand the Data group.
3) Drag the SQL Join transformation to the job.
4) Right-click the SQL Join transformation and select Ports Add Input Port to add three
new import ports.
5) Connect the FT_CUSTOMERS table to the first input port of the SQL Join transformation.
6) Connect the FT_GEOGRAPHY table to the second input port of the SQL Join
transformation.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-36 Chapter 7 Building a Business User Reporting Application

7) Connect the FT_ORDERS table to the third input port of the SQL Join transformation.
8) Connect the FT_PRODUCTS table to the fourth input port of the SQL Join transformation.
9) Connect the FT_TIME table to the fifth input port of the SQL Join transformation.
g. Add the Table Loader transformation to the job and connect it to the SQL Join transformation.
1) Click the Transformations tab.
2) Expand the Access group.
3) Drag the Table Loader transformation to the job.
4) Connect the SQL Join transformation to the Table Loader transformation.
h. Create a new target table named FT Orders Italy and Spain and store it in Orion Star
Sales Department Data.
1) Select File New Table.
2) Type FT Orders Italy and Spain in the Name field.
3) If necessary, click Browse next to the Location field.
a) Navigate to SAS Folders Orion Star Sales Department Data.
b) Click OK.
4) Click Next.
5) Verify that SAS is selected as the value for the DBMS field.
6) Select FT Case Study Library as the value for the Library field.
7) Click Next.
8) Expand Orion Star Sales Department Data.
9) Select the FT_CUSTOMERS table.
10) Hold down the SHIFT key and select the FT_TIME table.

11) Click to add all of the columns from all five tables to the Selected list box.

12) Click OK in the Error window.


13) Click Next.
14) Review the default column information and click Next.
15) Click Finish.
i. Add the target table to the job and connect it to the Table Loader transformation.
1) Using the Folders tab, navigate to Orion Star Sales Department Data.
2) Drag FT Orders Italy and Spain to the job window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-37

3) Connect the Table Loader transformation to the FT US Customer Subset table.


The job flow should resemble the following:

j. Modify the join criteria in the SQL Transformation.


1) Right-click the SQL Join transformation and select Open.
2) Select Where in the Navigate pane.
The default values should resemble the following:

3) Click New.
a) Click in the first Operand column of the new row and select Choose column(s).
b) Expand the FT_ORDERS table.
c) Select Customer_ID.
d) Click OK.
e) Click in the second Operand column of the new row and select Choose column(s).
f) Expand the FT_CUSTOMERS table.
g) Select Customer_ID.
h) Click OK.
4) Click New.
a) Click in the first Operand column of the new row and select Choose column(s).
b) Expand the FT_ORDERS table.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-38 Chapter 7 Building a Business User Reporting Application

c) Select Order_Date.
d) Click OK.
e) Click in the second Operand column of the new row and select Choose column(s).
f) Expand the FT_TIME table.
g) Select Date_ID.
h) Click OK.
5) Click New.
a) Click in the first Operand column of the new row and select Choose column(s).
b) Expand the FT_GEOGRAPHY table.
c) Select Country.
d) Click OK.
e) Click in the Operator column of the new row and select IN (,).
f) Click in the second Operand column of the new row and type ("IT","ES").
The WHERE clause should resemble the following:

6) Click to return to the SQL Join process flow.

k. Click to run the job and create the new table.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-39

l. Open the new table and verify the data.


1) Right-click the FT Orders Italy and Spain table and select Open.

2) Use the scroll bars to view the columns and rows of data to ensure that the table was populated
correctly. There should be 28,096 rows of data.
3) Close the View Data window.
m. Save the job and close the job window.
1) Select File Save to save the job.
2) Select File Close to close the job window.
2. Creating a New Cube
a. Using SAS Data Integration Studio, create a new cube named FT Order Cube Italy and Spain
and store it in Orion Star Sales Department Data.
b. Select File New Cube to begin building a new OLAP cube.
c. Specify the general properties.
1) Type FT Order Cube Italy and Spain in the Name field.
2) If necessary, click Select next to the Location field.
a) Select SAS Folders Orion Star Sales Department Data.
b) Click OK to close the Select a Location window.
3) Click Browse next to the Physical cube path field.
a) Select S:\ Workshop sbaft43.
b) Click OK to close the Browse window.
4) Verify that Detail table is selected as the value for the Input Type field.
5) Click Next.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-40 Chapter 7 Building a Business User Reporting Application

d. Select the FT Orders Italy and Spain table from the FT Case Study Library as both the input
table and drill-through table.
1) Click to expand FT Case Study Library.

2) Double-click FT Orders Italy and Spain to move the table to the Selected table list box.
3) Click Next.
4) Click to expand FT Case Study Library.

5) Double-click FT Orders Italy and Spain to move the table to the Selected table list box.
6) Click Next.
e. Define the Time dimension.

1) Click Add.
2) Type Time in the Name field.
3) Type Time Dimension in the Caption field.
4) Select TIME as the value for the Type field.
5) Click Next.
6) Click next to the Add button and select Add supplied time hierarchies.

7) Select Order_Date as the value for the Input column field.


8) Click the check box for the YMD supplied hierarchy.
9) Click the check box for the YQM supplied hierarchy.
10) Click OK.
11) Accept the default level attributes and click Next.
12) If necessary, select YMD as the value for the Default hierarchy field.
13) Click Finish.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-41

f. Define the Customer dimension.

1) Click Add.
2) Type Customer in the Name field.
3) Type Customer Dimension in the Caption field.
4) Verify that STANDARD is selected as the value for the Type field.
5) Click Next.
6) Click Add.
7) Double-click the following columns to add them to the Input columns for new levels list:
Customer_Age_Group
Customer_Type
Customer_Gender
8) Click OK.
9) Click Next.
10) Click Add to add a hierarchy for the new Customer dimension.
a) Type AgeGroup_Type_Gender in the Name field.
b) Type Age Group, Type, Gender Hierarchy in the Caption field.
c) Double-click Customer_Age_Group to move it to the Selected list box.
d) Double-click Customer_Type to move it to the Selected list box.
e) Double-click Customer_Gender to move it to the Selected list box.
f) Click OK.
11) Click Add to add a hierarchy for the new Customer dimension.
a) Type Type_AgeGroup_Gender in the Name field.
b) Type Type, Age Group, Gender Hierarchy in the Caption field.
c) Double-click Customer_Type to move it to the Selected list box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-42 Chapter 7 Building a Business User Reporting Application

d) Double-click Customer_Age_Group to move it to the Selected list box.


e) Double-click Customer_Gender to move it to the Selected list box.
f) Click OK.
12) If necessary, select AgeGroup_Type_Gender as the value of the Default hierarchy field.
13) Click Finish.
g. Define the Product dimension.

1) Click Add.
2) Type Product in the Name field.
3) Type Product Dimension in the Caption field.
4) Verify that STANDARD is selected as the value for the Type field.
5) Click Next.
6) Click Add.
7) Double-click the following columns to add them to the Input columns for the new levels list:
Product_Line
Product_Category
Product_Group
8) Click OK.
9) Click Next.
10) Click Add to add a hierarchy for the new Product dimension.
a) Type Product in the Name field.
b) Type Product Hierarchy in the Caption field.
c) Double-click Product_Line to move it to the Selected list box.
d) Double-click Product_Category to move it to the Selected list box.
e) Double-click Product_Group to move it to the Selected list box.
f) Click OK.
11) Click Finish.
12) Click Next.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-43

h. Select the measures and specify the measure format.

1) Click to expand CostPrice_Per_Unit.

2) Double-click Sum to add it to the Selected list box.


3) Double-click Average to add it to the Selected list box.
4) Click to expand Quantity.

5) Double-click Sum to add it to the Selected list box.


6) Double-click Average to add it to the Selected list box.
7) Click to expand Total_Retail_Price.

8) Double-click Sum to add it to the Selected list box.


9) Double-click Average to add it to the Selected list box.
10) Click Next.
11) Modify the measure details.
a) Type DOLLAR14. as the value for the Format column for CostPrice_Per_UnitAVG.
b) Type DOLLAR14. as the value for the Format column for CostPrice_Per_UnitSUM.
c) Type COMMA12. as the value for the Format column for QuantityAVG.
d) Type COMMA12. as the value for the Format column for QuantitySUM.
e) Type DOLLAR14. as the value for the Format column for Total_Retail_PriceAVG.
f) Type DOLLAR14. as the value for the Format column for Total_Retail_PriceSUM.
g) Select QuantitySUM as the value for the Default measure field.
12) Click Next.

No member properties are needed. Click Next.

i. Add an aggregation.
1) Click Add.
2) Type C1T1 in the Name field.
3) Double-click Customer_Age_Group to move it to the Selected column list box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-44 Chapter 7 Building a Business User Reporting Application

4) Double-click Year to move it to the Selected column list box.


5) Click OK.
6) Click Next.
j. Build the cube and verify that it was created successfully. Click Finish.
The cube is created and registered in the metadata and the SAS log is displayed.

k. Select File Exit to close SAS Data Integration Studio.


3. Creating Two New Information Maps
a. Log on to SAS Information Map Studio. Use Ellens credentials.
1) Select Start All Programs SAS SAS Information Map Studio 4.2.
2) Verify that the connection profile is My Server and click OK.
3) Type Ellen in the User ID field and type the password provided by the instructor.
4) Click OK.
5) If necessary, click OK to close the Create an Information Map window.
b. Create a new information map from the FT Orders Italy and Spain table in the FT Case Study
Library.
1) If necessary, click to expand the Resources pane.

2) Click (the Application Servers tab) in the Resources pane.


3) Click to expand the FT Case Study Library.

4) Double-click the FT Orders Italy and Spain table to add it to the Selected Resources list box
of the Design tab.
5) Click to hide the Resources pane.

6) Click to expand FT Case Study Library.

7) Click to expand the FT Orders Italy and Spain table and display the physical column
names.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-45

c. Double-click the following columns to create new data items from them:
CostPrice_Per_Unit
Customer_Age_Group
Customer_Contry
Customer_Gender
Month_Name
Order_Date
Product_Group
Quantity
Supplier_Country
Total_Retail_Price
Year_ID
1) Change the properties for Costprice Per Unit and Total Retail Price For This Product.
a) Hold down the CTRL key and select Cost Price Per Unit and Total Retail Price For
This Product.
b) Right-click on one of the selected values and select Properties.
c) Click Classification, Aggregations, Formats in the selection list.
d) Verify that DOLLAR is selected as the value for the Format name field.
e) Type 14 in the Valid width range field.
f) Verify that 0 is selected as the value for the Valid decimal range field.
g) Click OK to close the Data Item Properties window.
2) Change the properties for Quantity Ordered.
a) Right-click Quantity Ordered and select Properties.
b) Click Classification, Aggregations, Formats in the selection list.
c) Select Numeric as the value for the Format type field.
d) Select COMMA as the value for the Format name field.
e) Type 12 in the Valid width range field.
f) Verify that 0 is selected as the value for the Valid decimal range field.
g) Click OK to close the Data Item Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-46 Chapter 7 Building a Business User Reporting Application

3) Specify the dynamic value-generation method for several data items.


a) Hold down the CTRL key and select the following data items:
Customer Age Group
Customer Country
Product Group
Supplier Country
Year
b) Click the black triangle ( ) in the value cell for the Value-generation method property.
c) Click the User selects values from a dynamic list radio button.
d) Click OK to close the Data Item Properties window.
4) Specify the static list value-generation method for Customer Gender and Month Name.
a) Double-click Customer Gender.
b) Click Value-Generation Method in the selection list.
c) Click the User selects values from a static list radio button.
d) Click Get Values.

e) Click to move all of the values to the Selected values list box.

f) Click OK to close the Get Values window.


g) Click OK to close the Data Item Properties window.
h) Double-click Month Name.
i) Click Value-Generation Method in the selection list.
j) Click the User selects values from a static list radio button.
k) Click Get Values.

l) Click to move all of the values to the Selected values list box.

m) Click OK to close the Get Values window.


n) Click OK to close the Data Item Properties window.
5) Create a new prompted filter named Order Date Selector.
a) Select Insert New Filter.
b) Type Order Date Selector in the Filter name field.
c) Select Date Order Was Placed by Customer as the value for the Data item field.
d) Select Range of periods (is between) as the value for the Condition field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-47

e) Select Use single prompt for both 'From' and 'To' values as the value for the Value(s)
field.
f) Click New.
g) Type OrderDatePrompt in the Name field.
h) Type Select an order date range in the Displayed text field.
i) Click OK to close the New Prompt window.
j) Click OK to close the New Filter window.
6) Create a new prompted filter named Year Month Selector.
a) Select Insert New Filter.
(1) Type Year Month Selector in the Filter name field.
(2) Select Year as the value for the Data item field.
(3) Select Prompt user for value(s) as the value for the Value(s) field.
b) Click New.
(1) Type YearPrompt in the Name field.
(2) Type Select a year in the Displayed text field.
c) Click the Prompt Type and Values tab.
(1) Select User selects values from a dynamic list as the value for the Method for
populating prompt field.
(2) Click OK to close the New Prompt window.
d) Click Combinations.
e) Click Add.
(1) Select Month Name as the value for the Data item field.
(2) Select Prompt user for value(s) as the value for the Value(s) field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-48 Chapter 7 Building a Business User Reporting Application

f) Click New.
(1) Type MonthPrompt in the Name field.
(2) Type Select a month in the Displayed text field.
g) Click the Prompt Type and Values tab.
(1) Select User selects values from a static list as the value for the Method for
populating prompt field.
(2) Select Multiple values as the value of the Number of values field.
(3) Click Get Values.

(4) Click to copy all of the values to the Selected values list box.

(5) Click OK to close the Get Values window.


h) Click the All possible values check box.
Click the check box to make (all possible values) the default.
i) Click OK to close the New Prompt window.
j) Click Add.
k) Click OK to close the New Filter window.

7) Save the information map as FT Orders Map Italy and Spain.


a) Select File Save.
b) Navigate to Orion Star Sales Department Information Maps.
c) Type FT Orders Map Italy and Spain in the Name field.
d) Click Save.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-49

d. Create a new information map from the FT Order Cube Italy and Spain.
1) Select File New.
2) If necessary, click to expand the Resources pane.

3) Click (the Application Servers tab) in the Resources pane.


4) Select Cubes as the value of the Show field.
5) Double-click the FT Order Cube Italy and Spain table to add it to the Selected Resources
list box of the Design tab.
6) Click to hide the Resources pane.

7) Click to create data items from all of the measures and hierarchies in the cube.

8) Save the information map as FT Orders Map Italy and Spain.


a) Select File Save.
b) Navigate to Orion Star Sales Department Information Maps.
c) Type FT Order Cube Map Italy and Spain in the Name field.
d) Click Save.
e. Select File Exit to close SAS Information Map Studio.
4. Creating a New SAS Enterprise Guide Project and New Stored Processes
a. Open SAS Enterprise Guide. If necessary, change the connection profile to use Ellen.
1) Select Start All Programs SAS SAS Enterprise Guide 4.3.
2) Select New Project.
3) If necessary, follow these steps to change the connection profile to use Ellen.
a) Click Connection to open the Connections window.
b) Double-click Ellens Profile to make it the active profile.
c) Click Close to close the Connections window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-50 Chapter 7 Building a Business User Reporting Application

b. Add the FT Orders Italy and Spain table from Orion Star Sales Department Data to the
project.
1) Select File Open Data.
2) Navigate to SAS Folders Orion Star Sales Department Data.
3) Double-click FT Orders Italy and Spain.
4) Click to close the results and display the Process Flow window.

c. Use the Query Builder to select a subset of the rows from FT Orders Italy and Spain.
1) Right-click the FT_Orders_Italy_and_Spain table in the Process Flow window and select
Query Builder.
2) Drag the t1 table to the Select Data tab to select all columns.
3) Click Prompt Manager to build a new prompt to use in the filter. The Prompt Manager
window appears.
a) Click Add.
b) Type Country in the Name field.
c) Type Select a Country in the Displayed text field.
d) Click the Requires a non-blank value check box.
e) Click the Prompt Type and Values tab.
f) Select User selects values from a static list as the value for the Method for populating
prompt field.
g) Click Get Values. The Get Values window appears.
h) Click Browse to select your data source.
i) Click Project from the selection pane on the left.
j) Select the table.
k) Click Open.
l) Select Country as the value in the Column field.
m) Click Get values.
n) Click to copy all of the values to the Selected values list. After all the selections are
copied, the Get Values Window should resemble the following:
o) Click OK to close the Get Values window.
p) Click the All possible values check box to include that special value.
q) Click the radio button to set the default value to (all possible values).
r) Click OK to close the Add New Prompt window.
s) Click Close to close the Prompt Manager window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-51

4) Click the Filter Data tab.


a) Click (the Filter icon) on the Filter Data tab to create a new filter.

b) Verify that Basic Filter is selected.


c) Click Next.
d) Select Customer_Country in the Select Data Columns list box.
e) Click Next.
f) Verify that Equal to is selected as the value for the Operator field.
g) Click next to the Value field.

h) Click the Prompts tab.


i) Select &Country.
j) Click Next.
k) Click Finish.
5) Click Run.
6) Accept the default prompt value and click Run.
7) Click to close the results and display the Process Flow window

d. Use the Bar-Line Chart task to create the report indicated.


1) Select the table that was created by the query.
2) Select Tasks Graph Bar-Line Chart.
3) Assign Product_Group to the Column to chart role.
4) Assign Quantity to the Bar sum of role.
5) Assign CostPrice_Per_Unit to the Line sum of role.
6) Assign Total_Retail_Price to the Line sum of role.
7) Assign Country to the Stack role.
8) Change the attributes of the measures.
a) Right-click Quantity and select Properties.
(1) Click Change next to the Format field.
(2) Select Numeric in the Categories list.
(3) Select COMMAw.d in the Formats list.
(4) Type 12 in the Overall width field.
(5) Click OK to close the Formats window.
(6) Click OK to close the Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-52 Chapter 7 Building a Business User Reporting Application

b) Right-click CostPrice_Per_Unit and select Properties.


(1) Type Total Cost in the Label field.
(2) Click Change next to the Format field.
(3) Type 14 in the Overall width field.
(4) Type 0 in the Decimal places field.
(5) Click OK to close the Formats window.
(6) Click OK to close the Properties window.
c) Right-click Total_Retail_Price and select Properties.
(1) Type Total Retail Price in the Label field.
(2) Click Change next to the Format field.
(3) Type 14 in the Overall width field.
(4) Type 0 in the Decimal places field.
(5) Click OK to close the Formats window.
(6) Click OK to close the Properties window.
9) Select Bars in the selection list on the left side of the window.
a) Click Custom colors.
b) Select a light blue for the first color in the first row.
c) Select a light yellow for the second color in the first row.
10) Select Horizontal Axis in the selection list on the left side of the window.
Type a blank space as the value for the Label field.
11) Select Vertical Axis in the selection list on the left side of the window.
Type Total Quantity as the value for the Label field.
12) Select Vertical Right Axis in the selection list on the left side of the window.
Type a blank space as the value for the Label field.
13) Select Line Legend in the selection list on the left side of the window.
Select 9 pt as the font size.
14) Select Titles in the selection list on the left side of the window.
a) With Graph selected, clear the Use default text check box.
b) Type Order Analysis by Product Group as the title.
c) Select Footnote.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-53

d) Clear the Use default text check box.


e) Type Order Analysis by Product Group as the title.
f) Highlight the current value and press BACKSPACE or DELETE on the keyboard to
remove it.
15) Click Run.
16) Click to close the results and display the Process Flow window.

e. Create a stored process from the project.


1) Right-click in the background of the Process Flow window and select Create Stored Process.
2) Type FT Order Analysis by Product Group in the Name field.
3) Click Browse to change the value of the Location field to Orion Star Sales
Department Dashboards.
4) Click Save.
5) Click Next to move to Step 2.
6) Type the following code at the top of the window:
goptions gsfname=_webout gsfmode=replace;
goptions device=png;
7) Select Include code for and clear the Stored process macros check box.
8) Close the Code Preview window.
9) Click Next to move to Step 3.
10) Click No when you are prompted to add the stored process macros.
11) Clear the Package check box.
12) Click Next to move to Step 4.
13) Accept the default settings for the remaining steps and click Finish.
14) Accept the default prompt value and click Run.
f. Save the project as FT Stored Process for Dashboard in S:\Workshop\sbaft43 and close
SAS Enterprise Guide.
1) Select File Save Project As.
2) If necessary, navigate to S:\ Workshop sbaft43.
3) Type FT Stored Process for Dashboard in the File name field.
4) Click Save.
5) Select File Exit to close SAS Enterprise Guide.
6) Click OK when you are prompted to continue closing the current project.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-54 Chapter 7 Building a Business User Reporting Application

5. Creating a New Multi-Section Report in SAS Web Report Studio


a. Log on to SAS Web Report Studio. Use Ellens credentials.
1) Open Internet Explorer by selecting the Internet Explorer icon on the Windows taskbar
or by selecting Start All Programs Internet Explorer.
2) From the browser window, select Favorites SAS Web Report Studio. The SAS Web
Report Studio logon page opens.
3) Type Ellen in the User name field and specify the password provided by your instructor.
4) Click Log On.
b. Create the first report section.
1) Select File New Report.
2) Select the data source.
a) Select Data Select Data.
b) Click Select Data Source.
c) If necessary, navigate to SAS Folders Orion Star Sales Department Data.
d) Double-click FT Order Cube Italy and Spain.
e) Double-click the following data items to move them to the Selected data items list box:
Age Group, Type, Gender Hierarchy
Product Hierarchy
Ymd
Sum of Quantity
Sum of Total Retail Price
f) Click OK to close the Select Data window.
3) Specify the report header properties.
a) Click Header and select Edit.
b) Select Orion Star Report Header as the value for the banner image field.
c) Specify the font attributes for the text in the middle content section.
(1) Select 14 as the font size.
(2) Click B to set the bold face.

(3) Click to center-justify the text.

(4) Click the font color selector and choose a blue color of your choice.
d) Type Sales Analysis - Italy and Spain as the value for the title text.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-55

e) Click OK to close the Edit Header window.

4) Add a crosstab report object and specify the data assignment and properties.
a) Click (crosstab) and drag it to the first column of the first row.

b) Right-click the crosstab object and select Assign Data.


c) Drag Age Group, Type, Gender Hierarchy to the first item of the Rows role.
d) Drag Ymd to the first item of the Columns role.
e) Drag Sum of Quantity to the Hidden role.
f) Verify that Sum of Total Retail Price is the second item of the Columns role.
g) Verify that Product Hierarchy is the second item of the Rows role.
h) Click OK to close the Assign Data window.
i) Right-click the crosstab object and select Total.
j) Click the Column totals check box.
k) Click OK to close the Total window.
5) Add a bar chart report object and specify the data assignment and properties.
a) Click (bar chart) and drag it to the first column of the second row.

b) Right-click the bar chart and select Assign Data.


c) Verify Sum of Quantity is the only value assigned to the Bar Height role.
d) Verify Age Group, Type, Gender Hierarchy is assigned to the Bars role.
e) Verify Product Hierarchy, Ymd, and Sum Of Total Retail Price are all assigned to the
Hidden role.
f) Click OK to close the Assign Data window.
g) Right-click the bar chart and select Properties.
h) Click the Fixed size check box.
i) Click OK to close the Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-56 Chapter 7 Building a Business User Reporting Application

6) Add a pie chart report object and specify the data assignment and properties.
a) Click (pie chart) and drag it to the second column of the second row.

b) Right-click the pie chart and select Assign Data.


c) Drag Sum of Total Retail Price to the first item of the Segment Size role.
d) Drag Sum of Quantity to the first item of the Hidden role.
e) Verify that Age Group, Type, Gender Hierarchy is assigned to the Segments role.
f) Verify that Product Hierarchy, Ymd, and Sum Of Quantity are all assigned to the
Hidden role.
g) Click OK to close the Assign Data window.
h) Right-click the pie chart and select Properties.
i) Click the Fixed size check box.
j) Click the Legend tab.
k) Click the Right check box.
l) Click OK to close the Properties window.
7) Set up the report grid.
a) Click in the first column of the first row and drag to the right to select both columns.
b) Click to merge the two columns of the first row.

c) Click in the single column in the first row, drag down and to the right to select all three
cells.

d) Click to center-align the contents of all three report body cells.


8) Specify the report footer properties.
a) Click Footer and select Edit.
b) Select Orion Star Report Footer as the value for the banner image field.
c) Click the Left content tab.
(1) Type 33 in the Width field.
(2) Select Text as the value for the Content field.
(3) Select 8 as the font size.
(4) Type REPORT: as the value for the title text. (Add a blank space after the colon.)
(5) Select Report Name as the value of the Dynamic text field and click Insert.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-57

d) Click the Middle content tab.


(1) Type 34 in the Width field.
(2) Select 8 as the font size.
(3) Type DATA SOURCE NAME: as the value for the title text. (Add a blank space
after the colon.)
(4) Select Data Source Name as the value of the Dynamic text field and click Insert.
e) Click the Right content tab.
(1) Type 33 in the Width field.
(2) Select Text as the value for the Content field.
(3) Select 8 as the font size.
(4) Type REPORT AUTHOR: as the value for the title text. (Add a blank space after the
colon.)
(5) Select Report Author as the value of the Dynamic text field and click Insert.
f) Click the Include a horizontal line between the footer and the report content check
box.
g) Click OK to close the Edit Footer window.

9) Save the report.


a) Select File Save As.
b) Type FT Sales Analysis in the Name field.
c) If necessary, navigate to SAS Folders Orion Star Sales Department Reports.
d) Click Save.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-58 Chapter 7 Building a Business User Reporting Application

10) Click View to view the first section of the report.


a) Click to expand 2007 in the crosstab.

b) Click the corner of each chart to resize them to fit under the expanded crosstab table.

c. Create the second report section.


1) Rename the first report section and insert a new section.
a) Click Edit to return to Edit mode.
b) Select Edit Sections Rename this Section.
c) Type Sales Analysis in the New section name field.
d) Click OK.
e) Select Insert New Section.
f) Type Customer Analysis in the New section name field.
g) Verify that Get new data is selected.
h) Click Copy header from and accept the default section name.
i) Click Copy footer from and accept the default section name.
j) Click OK.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-59

2) Update the report header properties.


a) Click Header and select Edit.
b) Type Customer Analysis - Italy and Spain as the value for the title text.
c) Click OK to close the Edit Header window.
3) Select the data source.
a) Select Data Select Data.
b) If necessary, navigate to Orion Star Sales Department Information Maps.
c) Click Select Data Source.
d) Double-click FT Orders Map Italy and Spain.
e) Double-click the following data items to move them to the Selected data items list box:
Customer Country
Customer Age Group
Customer Gender
Quantity Ordered
Cost Price Per Unit
Total Retail Price For This Product
f) Rename Quantity Ordered to Total Quantity.
(1) Select Quantity Ordered in the Selected data items list.

(2) Click .

(3) Type Total Quantity in the New name field.


(4) Click OK to close the Rename Data Item window.
g) Rename Cost Price Per Unit to Total Cost.
(1) Select Cost Price Per Unit in the Selected data items list.

(2) Click .

(3) Type Total Cost in the New name field.


(4) Click OK to close the Rename Data Item window.
h) Rename Total Retail Price For This Product to Total Retail Price.
(1) Select Total Retail Price For This Product in the Selected data items list.

(2) Click .

(3) Type Total Retail Price in the New name field.


(4) Click OK to close the Rename Data Item window.
(5) Click OK to close the Select Data window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-60 Chapter 7 Building a Business User Reporting Application

4) Add a section filter.


a) Select Data Section Filters.
b) Click the check box for Order Date Selector.
c) Click OK to close the Select Filters window.
5) Add a tile chart report object and specify the data assignment and properties.
a) Click (tile chart) and drag it to the first column of the first row.

b) Right-click the tile cart and select Assign Data.


c) Verify that Customer Country, Customer Age Group, and Customer Gender are
assigned to the Columns role in that order.
d) Drag Total Retail Price to the Size role.
e) Drag Total Cost to the Hidden role.
f) Click OK to close the Assign Data window.
g) Right-click the tile chart object and select Properties.
(1) Select Custom as the value for the Size field.
(2) Click the Tile tab.
(3) Select Flow as the value for the Layout type field.
(4) Click OK to close the Properties window.
6) Add a bar-line chart report object and specify the data assignment and properties.
a) Click (bar-line chart) and drag it to the second column of the first row.

b) Right-click the bar-line chart and select Assign Data.


c) Drag Total Retail Price to be the first item in the Bar Height role.
d) Drag Total Cost to be the second item in the Bar Height role.
e) Drag Total Quantity to the Line Height role.
f) Drag Customer Age Group to the Category role.
g) Drag Customer Country to the Vertical Series role.
h) Verify that Customer Gender is assigned to the Hidden role.
i) Click OK to close the Assign Data window.
j) Right-click the bar-line chart and select Properties.
k) Click the Fixed size check box.
l) Click OK to close the Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-61

7) Add a crosstab report object and specify the data assignment and properties.
a) Click (crosstab) and drag it to the first column of the second row.
b) Right-click the crosstab object and select Assign Data.
c) Verify that Customer Country, Total Quantity, Total Cost, and Total Retail Price are
assigned to the Columns role in that order.
d) Drag Customer Gender to be the first item of the Columns role.
e) Click OK to close the Assign Data window.
f) Right-click the crosstab object and select Conditional Highlighting.
g) Click New.
(1) Select Total Retail Price as the value for the Measure field.
(2) Select Greater than as the value for the Condition field.
(3) Type 200,000 in the Value field.
(4) Click the Color and Font tab.
(5) Click the second color selector and select a light green background color.
(6) Click OK to create the new rule.
h) Click New.
(1) Select Total Retail Price as the value for the Measure field.
(2) Select Is between as the value for the Condition field.
(3) Type 100,000 in the Min value field.
(4) Type 200,000 in the Max value field.
(5) Click the Color and Font tab.
(6) Click the second color selector and select a light yellow background color.
(7) Click OK to create the new rule.
i) Click New.
(1) Select Total Retail Price as the value for the Measure field.
(2) Select Less than as the value for the Condition field.
(3) Type 100,000 in the Value field.
(4) Click the Color and Font tab.
(5) Click the second color selector and select a light red background color.
(6) Click OK to create the new rule.
(7) Click OK to close the Conditional Highlighting window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-62 Chapter 7 Building a Business User Reporting Application

8) Set up the report grid.


a) Click in the first row of the first column and drag to the second row to select both.
b) Click to merge the two rows of the second column.

c) Click in the first column in the first row. Drag down and to the right to select all three
cells.
d) Click to center-align the contents of the three report body cells.

9) Select File Save to save the report.


10) Click View to view the second section of the report.
11) Enter the prompt values.
a) Select Custom as the value for the Range type field.
b) Select January 01, 2004 as the value for the From field.
c) Select December 31, 2006 as the value for the To field.
d) Click View Report.
12) Resize the report objects.
a) Resize the Customer Age Group column of the crosstab object so that the text is on one
line.
b) Resize the Total Quantity column of the crosstab object so that the text is on one line.
c) Resize the Total Cost column of the crosstab object so that the text is on one line.
d) Resize the Total Retail Price column of the crosstab object so that the text is on one line.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-63

e) Move the cursor to the bottom right corner of the tile chart. Resize it to be the same width
as the crosstab and half of the height of the bar-line chart.

After resizing the tile chart, the country tiles are side to side instead of top to
bottom.
f) Select File Save to save the report.

d. Create the third report section.


1) Insert a new section.
a) Click Edit to return to Edit mode.
b) Select Insert New Section.
c) Type Product Analysis in the New section name field.
d) Click Copy data from and select Customer Analysis as the section name.
e) Click Copy header from and accept the default section name.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-64 Chapter 7 Building a Business User Reporting Application

f) Click Copy footer from and accept the default section name.
g) Click OK.
2) Update the report header properties.
a) Click Header and select Edit.
b) Type Product Analysis - Italy and Spain as the value for the title text.
c) Click OK to close the Edit Header window.
3) Update the selected data items.
a) Select Data Select Data.
b) Double-click Customer Age Group in the Selected data items list box to remove it.
c) Double-click Customer Gender in the Selected data items list box to remove it.
d) Double-click Product Group in the Available data items list box to add it to the Selected
items list box.
e) Double-click Supplier Country in the Available data items list box to add it to the
Selected items list box.
f) Click OK to close the Select Data window.
4) Add a section filter.
a) Select Data Section Filters.
b) Clear the Order Data Selector check box.
c) Click the Year Month Selector check box.
d) Click OK to close the Select Filters window.
5) Add a line chart report object and specify the data assignment and properties.
a) Click (line chart) and drag it to the first column of the first row.

b) Right-click the line chart and select Assign Data.


c) Verify that Total Quantity is assigned to the Line Height role.
d) Drag Total Retail Price to be the second item in the Line Height role.
e) Drag Product Group to the Line role.
f) Drag Customer Country to the Vertical Series role.
g) Verify that Total Cost and Supplier Country are assigned to the Hidden role.
h) Click OK to close the Assign Data window.
i) Right-click the bar chart and select Properties.
j) Click the Fixed size check box.
k) Click OK to close the Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-65

6) Add a crosstab report object and specify the data assignment and properties.
a) Click (crosstab) and drag it to the first column of the second row.

b) Right-click the crosstab object and select Assign Data.


c) Verify that Customer Country is the first item of the Columns role.
d) Verify that Total Quantity is the second item of the Columns role.
e) Verify that Total Cost is the third item of the Columns role.
f) Verify that Total Retail Price is the fourth item of the Columns role.
g) Verify that Product Group is the first item of the Rows role.
h) Drag Supplier Country to the Hidden role.
i) Click OK to close the Assign Data window.
7) Add a pie chart report object and specify the data assignment and properties.
a) Click (pie chart) and drag it to the second column of the second row.

b) Right-click the pie chart and select Assign Data.


c) Drag Total Retail Price to the first item of the Segment Size role.
d) Drag Total Quantity to the Hidden role.
e) Drag Supplier Country to the Segments role.
f) Verify that Total Cost, Total Quantity, Product Group, and Customer Country are all
assigned to the Hidden role.
g) Click OK to close the Assign Data window.
h) Right-click the pie chart and select Properties.
i) Click the Fixed size check box.
j) Click OK to close the Properties window.
8) Set up the report grid.
a) Click in the first column of the first row and drag to the right to select both columns.
b) Click to merge the two columns of the first row.

c) Click in the single column in the first row. Drag down and to the right to select all three
cells.
d) Click to center-align the contents of all three report body cells.
9) Select File Save to save the report.
10) Click View to view the second section of the report.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-66 Chapter 7 Building a Business User Reporting Application

11) Enter the prompt values.


a) Select 2007 as the value for the Select a year field.
b) Verify (all possible values) is selected as the value for the Select a month field.
c) Click View Report.
12) Resize the report objects as desired.

13) Select File Save to save the report.


e. Log off from SAS Web Report Studio and close the Web browser.
1) Click Log Off Ellen to log off from SAS Web Report Studio.
2) Select File Exit to close the Web browser.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-67

6. Building the FT Sales Analysis Italy and Spain Dashboard


a. Log on to SAS BI Dashboard. Using Ellens credentials.
1) If necessary, open Internet Explorer by selecting the Internet Explorer icon on the Windows
taskbar or by selecting Start All Programs Internet Explorer.
2) From the browser window, select Favorites SAS BI Dashboard.
3) Type Ellen in the User name field and specify the password provided by your instructor.
4) Click Log On.
5) Click Manage Dashboards.
b. Create a new indicator data item named DAT_FT Sales Analysis for Italy and Spain.
1) Select File New Indicator Data.
2) Type DAT_FT Sales Analysis for Italy and Spain in the Name field.
3) Click OK.
4) Select SQL Query as the value for the Data source field.
5) Type the following in the SQL query field:

6) Click Apply Query Changes.


The Data Mapping tab should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-68 Chapter 7 Building a Business User Reporting Application

7) Select the Query Results tab to view the columns and rows returned by the query.

8) Save the new indicator data item in the Orion Star Sales Department Dashboards
location.
a) Select File Save As.
b) Navigate to Orion Star Sales Department Dashboards.
c) Accept the value for the Name field.
d) Click Save.
e) Select File Close.
c. Create a new indicator data item named DAT_FT Shoe Suppliers.
1) Select File New Indicator Data.
2) Type DAT_FT Shoe Suppliers in the Name field.
3) Click OK.
4) Select Table as the value for the Data source field.
5) Click next to the FT Case Study Library to expand it.
6) Select the FT_PRODUCTS table.
The available columns list is populated with the columns from the selected table.
7) Select COUNT as the value for the Summary field for the Product_ID column.

8) Clear the last check box for the Product_Line column.


9) Clear the last check box for the Product_Category column.
10) Clear the last check box for the Product_Name column.
11) Clear the last check box for the Supplier_Name column.
12) Clear the last check box for the Supplier_ID column..

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-69

13) Type the following in the Filters field:


(product_group contains "Tracker" or product_group contains
"Eclipse") and supplier_country not in("US","GB")

14) Click Apply Query Changes.


The Data Mapping tab in the Preview Design area should resemble the following:

15) Select the Query Results tab to view the columns and rows returned by the query.

16) Save the new indicator data item in the Orion Star Sales Department Dashboards
location.
a) Select File Save As.
b) Navigate to Orion Star Sales Department Dashboards.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-70 Chapter 7 Building a Business User Reporting Application

c) Accept the value for the Name field.


d) Click Save.
e) Select File Close.
d. Create a new range named RNG_FT Sales by Company.
1) Select File New Range.
2) Type RNG_FT Sales by Company in the Name field.
3) Click OK.
4) Click Add Interval.
5) Type 5,000 in the Upper bound field.
6) Click OK.
7) Click Add Interval.
8) Type 10,000 in the Upper bound field.
9) Click OK.
The list of intervals and their attributes should resemble the following:

10) Accept the default attributes for the < 5,000 interval.
11) Change the attributes for the >= 5,000 and < 10,000 interval.
a) Select On Target as the value for the Code Interval field.
b) Verify that the color changed to yellow.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-71

12) Change the attributes for the >= 10,000 interval.


a) Select Above Target as the value for the Code Interval field.
b) Verify that the color changed to green.
The complete range should resemble the following:

13) Save the new range in the Orion Star Sales Department Dashboards location.
a) Select File Save As.
b) Navigate to Orion Star Sales Department Dashboards.
c) Accept the value for the Name field.
d) Click Save.
e) Select File Close to close the range.
e. Create a new indicator named IND_FT Sales Target Analysis.
1) Select File New Indicator.
2) Type IND_FT Sales Target Analysis in the Name field.
3) Select Bar Chart With Bullet as the value for the Display type field.
4) Click Browse next to the Indicator data field.
a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Select DAT_FT Sales Analysis for Italy and Spain.
c) Click OK.
5) Click Browse next to the Range field.
a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Select RNG_FT Sales by Company.
c) Click OK.
6) Click OK to close the Create an Indicator window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-72 Chapter 7 Building a Business User Reporting Application

7) Specify the Role Mapping values in order to display the indicator.


a) Select sales as the value for the Range Value field.
b) Select Company as the value for the X axis value field.
c) Select salestarget as the value for the Bar value field.
d) Select sales as the value for the Bullet value field.
e) Type a blank space as the value for the X axis title field.
f) Type Sales in the Y axis title field.

8) Select File Save As.


a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Accept the value for the Name field.
c) Click Save.
9) Select File Close to close the indicator.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-73

f. Create a new indicator named IND_FT Shoe Supplier Analysis.


1) Select File New Indicator.
2) Type IND_FT Shoe Supplier Analysis in the Name field.
3) Select Clustered Bar Chart as the value for the Display type field.
4) Click Browse next to the Indicator data field.
a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Select DAT_FT Shoe Suppliers.
c) Click OK.
5) Click OK to close the Create an Indicator window.
6) Set the indicator size.
a) Type 475 in the Width field.
b) Type 300 in the Height field.
7) Specify the Role Mapping values in order to display the indicator.
a) Select Product_Group as the value for the X axis value field.
b) Select Supplier_Country as the value for the Cluster group field.
c) Select Product_ID as the value for the Y axis value field.
d) Type a blank space as the value for the X axis title field.
e) Type Product Count in the Y axis title field.
f) Select Stagger as the value for the X axis labels field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-74 Chapter 7 Building a Business User Reporting Application

8) Select File Save As.


a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Accept the value for the Name field.
c) Click Save.
9) Select File Close to close the indicator.
g. Create a new indicator named IND_FT Order Analysis by Product Group.
1) Select File New Indicator.
2) Type IND_ FT Order Analysis by Product Group in the Name field.
3) Select Custom Graph as the value for the Display type field.
4) Click OK to close the Create an Indicator window.
5) Set the indicator size.
a) Type 600 in the Width field.
b) Type 500 in the Height field.
6) In the Image URL field, type the URL for the SAS Stored Process Web Application and
specify the name/value information to run the desired stored process and generate the image.
http://sasbap.demo.sas.com:8080/SASStoredProcess/do?_program=%2FOrion+Star%2
FSales+Department%2FDashboards%2FFT+Order+Analysis+by+Product+Group
7) Select File Save As.
a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Accept the value for the Name field.
c) Click Save.
8) Select File Close to close the indicator.
h. Create a new dashboard named DSH_FT Sales Analysis Italy and Spain.
1) Create the new dashboard.
a) Select File New Dashboard.
b) Type DSH_FT Sales Analysis Italy and Spain in the Name field.
c) Click OK.
2) Set the dashboard properties.
a) Type 850 in the Width field.
b) Type 550 in the Height field.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-75

3) Add the FT Order Analysis by Product Group indicator.


a) In the Objects pane, navigate to Orion Star Sales Department Dashboards.
b) Drag the IND_FT Order Analysis by Product Group indicator to the upper left corner
of the dashboard.
c) Set the Object properties.
(1) Select IND_FT Order Analysis by Product Group in the dashboard.
(2) Set the Size properties.
(i) Type 500 in the Width field.
(ii) Type 500 in the Height field.
(3) Set the Zoom (%) properties.
(i) Type 175 in the Width field.
(ii) Type 100 in the Height field.
The Object properties should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-76 Chapter 7 Building a Business User Reporting Application

4) Add the FT Sales Target Analysis indicator.


a) In the Objects pane, navigate to Orion Star Sales Department Dashboards.
b) Drag the IND_FT Sales Target Analysis indicator next to the FT Order Analysis by
Product Group indicator.
c) Set the Object properties.
(1) Select IND_FT Sales Target Analysis in the dashboard.
(2) Set the Size properties.
(i) Type 300 in the Width field.
(ii) Type 225 in the Height field.
(3) Set the Zoom (%) properties.
(i) Type 150 in the Width field.
(ii) Type 150 in the Height field.
The Object properties should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7.2 Solutions to Exercises 7-77

5) Add the FT Shoe Supplier Analysis indicator.


a) In the Objects pane, navigate to Orion Star Sales Department Dashboards.
b) Drag the IND_FT Shoe Supplier Analysis indicator next to the FT Order Analysis by
Product Group indicator and below the FT Sales Target Analysis indicator.
c) Set the Object properties.
(1) Select IND_FT Shoe Supplier Analysis in the dashboard.
(2) Set the Size properties.
(i) Type 300 in the Width field.
(ii) Type 250 in the Height field.
(3) Set the Zoom (%) properties.
(i) Type 150 in the Width field.
(ii) Type 150 in the Height field.
The Object properties should resemble the following:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
7-78 Chapter 7 Building a Business User Reporting Application

6) Select File Save As.


a) If necessary, navigate to Orion Star Sales Department Dashboards.
b) Accept the value for the Name field.
c) Click Save.
i. Test the dashboard in the Dashboard Viewer.
1) Select View Go to Dashboard Viewer.

2) Test the zoom actions on each indicator.


3) Click Log Off to log off from SAS BI Dashboard.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.

Chapter 8 Overview of SAS Visual
BI

8.1 Introduction to SAS Visual BI ........................................................................................ 8-3

8.2 Exploring the SAS Integration with JMP ...................................................................... 8-8


Demonstration: Using SAS Visual BI ................................................................................... 8-16

8.3 Solutions to Student Activities (Polls/Quizzes) ......................................................... 8-31

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-2 Chapter 8 Overview of SAS Visual BI

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.1 Introduction to SAS Visual BI 8-3

8.1 Introduction to SAS Visual BI

Objectives
Define some of the main features of SAS Visual BI
(JMP).
Describe the basics of the JMP interface.
Describe the basics of a JMP data table.

3
3

What Is SAS Visual BI?


SAS Visual BI, powered by JMP software,
provides data visualization capabilities to
the platform for SAS Business Analytics.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-4 Chapter 8 Overview of SAS Visual BI

What Is SAS Visual BI?


JMP is software for interactive statistical
graphics and includes the following:
A spreadsheet for viewing, editing, entering,
and manipulating data
A broad range of graphical and statistical methods
for data analysis
An extensive design of experiments module

Options to select and display subsets of the data


Data management tools for sorting and combining
tables
A scripting language for saving frequently used
routines

8.01 Poll
SAS Visual BI is how JMP is referenced when it
is part of the platform for SAS Business Analytics.
Yes
No

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.1 Introduction to SAS Visual BI 8-5

JMP Interface
When JMP is initialized, the JMP Home and Tip of the
Day windows appear.

9
9

JMP Starter Window


The JMP Starter window provides a way to access
commands without using the menus.

10
1
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-6 Chapter 8 Overview of SAS Visual BI

JMP Preferences
JMP preferences enable you to specify general and
specific settings and save the settings so that they will
be associated
with your
JMP session.

11
1
1

Data Table Elements


JMP data is organized into rows and columns that are
referred to as a data table. A data table has two parts, the
data table panels and the data grid.

Data grid
Data table
panels

12
1
2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.1 Introduction to SAS Visual BI 8-7

Platforms
Each command launches a platform.
A platform is an interactive window that can be used
to analyze data, work with points on plots, and save
results.
The platform persists until it is closed.

Any number of data tables can be open at a time,


and any number of platforms can be displayed for
each data table.
JMP is a discovery tool rather than a presentation facility,
that is, the more perspectives provided on data, the
better. After discovering what your data says, you choose
the best way to present the results.

13
1
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-8 Chapter 8 Overview of SAS Visual BI

8.2 Exploring the SAS Integration with JMP

Objectives
Define SAS Integration with JMP.
Describe data visualization using JMP.

15
1
5

Working with SAS Data from JMP


Beginning with JMP 7, you can connect to a SAS
Metadata Server and work directly with SAS data sets.
Specifically, you can do the following:
Import whole SAS data sets or portions of data sets

Make changes and save those changes directly


in the original SAS data set
Run stored processes

Submit SAS code from JMP

16
1
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-9

8.02 Poll
If you want to access platform data, do you have to log on
to the metadata server?
Yes
No

18

Setting Preferences for SAS Integration


The SAS Integration category in the JMP Preferences
window is where you specify the default settings for
working with a SAS Metadata Server.

20
2
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-10 Chapter 8 Overview of SAS Visual BI

Working with SAS in JMP 9


There are several ways that you can work with SAS in JMP 9.
The SAS category in the JMP Starter window provides links to
JMP platforms that enable you to do the following:
Create or open a SAS program

Create a JMP table from a local SAS data set or from


a data source registered in a SAS Metadata Server
Run a SAS Stored
Process
Create a SAS data set
from an open JMP table
Analyze JMP data using
selected SAS procedures
Specify server
connection information

21
2
1

Importing Data from a SAS Server


There are two options for importing data registered
in a SAS Metadata Server:
Browse SAS Data

Browse SAS Folders

22
2
2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-11

Import Options
The Import Options area of the Browse SAS Data window
enables you to select the columns to import and specify a
WHERE clause to control which rows are imported.

You can also import


a random sample
and write custom
SQL statements.
23
2
3

8.03 Multiple Choice Poll


Which method for importing data registered in the
SAS Metadata Server enables you to filter the data?
a. Browse SAS Data
b. Browse SAS Folder

25

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-12 Chapter 8 Overview of SAS Visual BI

Data Visualization
After you import data into JMP, you can use the power
of JMP to visualize your data. One way to do this is
to use a bubble plot.
A bubble plot is a
scatter plot that
draws its points as
circles (bubbles).
Bubble plots can
produce dramatic
visualizations and
make interesting
discoveries easy.

27
2
7

Bubble Plot Platform: Roles


The Bubble Plot platform consists of several roles.
Y The columns assigned to Y
X these roles become the (X,
Y) coordinates of the
bubbles in the plot.
ID
These roles are required.
ID This role can be used to X
identify rows that should be
aggregated and displayed
as a single bubble.

2
8
28 continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-13

Bubble Plot Platform: Roles


The Bubble Plot platform consists of several roles.
Sizes This role controls the
size of the bubbles.
Sizes
Time Assigning a variable
to this role cause
Time
separate coordinates,
sizes, and colors to be
maintained for each
unique time period.

2
9
29 continued...

Bubble Plot Platform: Roles


The Bubble Plot platform consists of several roles.
Coloring Assigning a variable
to this role produces
bubbles that are
Coloring
colored based on
the value of the
variable.
By Assigning a variable
to this role produces
separate output for
each unique value of
the BY variable.

30
3
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-14 Chapter 8 Overview of SAS Visual BI

Graph Builder
The Graph Builder platform enables the interactive display
of both continuous and categorical data columns.

31
3
1

Running a Stored Process in JMP


To run a stored process in JMP, you begin by selecting
Browse SAS Folders from the SAS category of the JMP
Starter window.

32
3
2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-15

Stored Process Selection


The Browse SAS Folders window enables you to navigate
to the folder that contains the stored process that you
want to run.
Select the desired stored
process and click Run.

33
3
3

Parameter Specification
If the stored process has parameters, you are prompted
for your selections. If there are no parameters, you are
asked if you want to run the selected stored process.

34
3
4

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-16 Chapter 8 Overview of SAS Visual BI

Using SAS Visual BI

In this demonstration, you access data from the SAS server and use it to perform two different graphical
analyses.
1. Open JMP by selecting Start All Programs JMP 9 JMP 9. The JMP desktop appears
and, by default, opens the JMP Home Window, as well as the Tip of the Day window.

2. Click Close to close the Tip of the Day window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-17

Setting Up the SAS Integration Preferences in JMP

1. Open the JMP Starter window by selecting View JMP Starter.


2. With File selected in the Click Category panel, click Preferences.
3. Scroll down and select SAS Integration from the list on the left side of the window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-18 Chapter 8 Overview of SAS Visual BI

The SAS Integration preferences are displayed.

4. Verify that 9.2 is selected as the value in the SAS Server Version field.
5. Verify that the I want to connect to a SAS Metadata Server check box is selected.

6. Click the Use SAS column labels for column names during data import check box
in the SAS Data Import section.

7. Click OK to save the changes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-19

Importing a SAS Data Source into JMP

1. In the JMP Starter window, select SAS from the Click Category panel.
2. Click Browse SAS Folders.

JMP connects to the SAS Metadata Server and opens the Browse SAS Folders window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-20 Chapter 8 Overview of SAS Visual BI

3. Double-click the Orion Star folder (or click to expand the folder).

4. Double-click the Marketing Department folder.


5. Double-click the Data folder.
6. Select SALES_ANALYSIS.
7. Click Run.
JMP connects to the SAS Server and displays the JMP Progress window while the data is loaded.

After the data is downloaded from the server, it is displayed in a data table.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-21

Creating a Bubble Plot

Suppose that you are interested in observing how Total Sales and Total Cases changed over time for the
product categories and product subcategories. Create a bubble plot from the data set to explore these
variables.

The steps below assume that the SALES_ANALYSIS data source is still open in a JMP data
table.
1. From the data table menus, select Graph Bubble Plot.
The launch dialog box for the Bubble Plot platform appears.

2. Assign the Y role.


a. From the Select Columns list box, select Product Category.
b. From the Cast Selected Columns into Roles list, click Y to assign Product Category to the Y
role.
3. Assign the X role.
a. From the Select Columns list box, select Total Sales.
b. From the Cast Selected Columns into Roles list, click X to assign Total Sales to the X role.
4. Assign the ID role.
a. From the Select Columns list box, select Product Subcategory.
b. From the Cast Selected Columns into Roles list, click ID to assign Product Subcategory to the
ID role.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-22 Chapter 8 Overview of SAS Visual BI

5. Assign the Time role.


a. From the Select Columns list box, select Year.
b. From the Cast Selected Columns into Roles list, click Time to assign Year to the Time role.
6. Assign the Sizes role.
a. From the Select Columns list box, select Total Cases.
b. From the Cast Selected Columns into Roles list, click Size to assign Total Cases to the Sizes role.
7. Assign the Coloring role.
a. From the Select Columns list box, select Product Subcategory.
b. From the Cast Selected Columns into Roles list, click Coloring to assign Product Subcategory
to the Coloring role.
The launch dialog box should resemble the following:

8. Click OK in the launch dialog box.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-23

The new bubble plot platform appears.

The size of the plot can be expanded if needed. To do so, move the cursor over the lower right corner
of the plot. The cursor changes to a double-arrow.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-24 Chapter 8 Overview of SAS Visual BI

9. Click and drag to the desired size.

Release the cursor to show the new plot size; the window resizes to accommodate the new plot size.
10. The initial view of the plot might be difficult to read. Drag the Circle Size slider to the right
to increase the circle size.

11. The current view is for 2001 sales. Click Step to see 2002.
12. Click Go to see the plot displayed over time.
13. When you are finished viewing, click Stop.

The bubble plot can be saved outside of JMP as an SWF file, which can be played using
Adobe Flash.
14. Click the red arrow next to the title of the bubble plot and select Save for Adobe Flash platform (.SWF).

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-25

15. Save the file on the Windows desktop. Use the default name.
16. Click Save.
Because the Open HTML companion after save option is selected, a browser window appears
and displays the companion HTML file.

17. Select to run the animation.

18. Drag the Size slider to the right to enlarge the bubbles.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-26 Chapter 8 Overview of SAS Visual BI

19. Clear several of the Product Subcategory check boxes to hide the corresponding bubbles.

20. Click on a single bubble to select it. By default, trailing lines are drawn after the selected bubble.

21. Click in the upper right corner next to the bubble plot name to view the available options.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-27

22. Click the button in the upper right corner to open a Web page that provides information about
how the use this bubble plot.

23. Select File Exit to close the new browser window with the instructions.
24. Select File Exit to close the browser window with the animation.
25. In JMP, click the X to close the bubble plot.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-28 Chapter 8 Overview of SAS Visual BI

Creating a Graph with the Graph Builder

The Graph Builder enables you to create graphs interactively. The Graph Builder provides an easy way to
immediately see how your selections are used to graph the information from the data source.

The steps below assume that the SALES_ANALYSIS data source is still open in a JMP data
table.
1. From the data table menus, select Graph Graph Builder.
The Graph Builder platform appears.

You are interested in seeing the trend of total sales dollars by month for all of the years of data in the
data source.
2. Drag Month from the Selected Columns list box to the X graph zone (bottom center).
3. Drag Total Sales from the Selected Columns list box to the Y graph zone (left side).

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.2 Exploring the SAS Integration with JMP 8-29

The graph is updated to reflect your choices.

4. You can create a separate panel for each year by dragging Year from the Selected Columns list box
to the Wrap graph zone (top right).

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-30 Chapter 8 Overview of SAS Visual BI

5. Although this does show the total sales trend by month for each year, it might be preferable to view
all the information on one graph.
a. Click Undo to remove the assignment of year.

You can also drag Year from the heading above the panels back to the Selected Columns
list box.
b. Drag Year from the Selected Columns list box to the Overlay graph zone (upper right corner).

c. Because this is the graph that you want, click .

6. Close the Graph Builder window.


7. Select File Close to close the SALES_ANALYSIS data table.
8. Click No when you are prompted to save the changes.
9. Select File Exit JMP in the JMP Home Window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8.3 Solutions to Student Activities (Polls/Quizzes) 8-31

8.3 Solutions to Student Activities (Polls/Quizzes)

8.01 Poll Correct Answer


SAS Visual BI is how JMP is referenced when it
is part of the platform for SAS Business Analytics.
Yes
No

Both SAS Visual BI and JMP are names that describe


JMP software.

8.02 Poll Correct Answer


If you want to access platform data, do you have to log on
to the metadata server?
Yes
No

19

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
8-32 Chapter 8 Overview of SAS Visual BI

8.03 Multiple Choice Poll Correct Answer


Which method for importing data registered in the
SAS Metadata Server enables you to filter the data?
a. Browse SAS Data
b. Browse SAS Folder

Browse SAS Data enables you to specify a WHERE


clause to control which rows are imported.

26

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 9 Examining the
Environment Metadata

9.1 Reviewing the Platform for SAS Business Analytics .................................................. 9-3

9.2 Reviewing the Couse Environment and Metadata ..................................................... 9-10


Demonstration: Review the Metadata Defined on the Classroom Image ............................ 9-14

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-2 Chapter 9 Examining the Environment Metadata

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.1 Reviewing the Platform for SAS Business Analytics 9-3

9.1 Reviewing the Platform for SAS Business Analytics

Objectives
Review the architecture and applications that make
up the platform for SAS Business Analytics.
Review the definition of metadata users, groups,
and roles.
Review the structure and use of the SAS Folders tree.
Define the purpose and types of connection profiles.

3
3

SAS Platform Architecture (Review)


The platform for
SAS Business
Analytics consists
of a multiple-tier
environment that
is typically
represented
by the following:
client tier

middle tier

server tier

data tier

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-4 Chapter 9 Examining the Environment Metadata

SAS Platform Applications (Review)


The SAS platform applications provide intuitive point-and-
click interfaces to surface the power of business analytics
without requiring technical expertise.

SAS Platform Applications

Data Management Analytics Reporting

SAS Data Integration Studio SAS Enterprise Guide SAS Information Delivery Portal

DataFlux dfPower Studio SAS Enterprise Miner SAS BI Dashboard

SAS OLAP Cube Studio SAS Visual BI (JMP) SAS Web Report Studio

SAS Information Map Studio SAS Forecast Studio SAS Add-In for Microsoft Office

Metadata Users and Groups (Review)


In order to control access to SAS platform content, SAS
must know who is making each request and what type
of functionality was requested.

Users A user is an individual person or service


identity.
Groups A group is a set of users. Groups provide an
easy method to specify permissions for similar
users.

6
6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.1 Reviewing the Platform for SAS Business Analytics 9-5

Metadata Roles (Review)


Roles determine which user interface elements a user
sees when interacting with an application. The various
features in applications that provide role-based
management are called capabilities.

Applications that support roles


include the following:
SAS Add-In for Microsoft Office

SAS Enterprise Guide

SAS Web Report Studio

SAS Management Console

7
7

SAS Folders Tree (Review)


The folders are arranged in a structure that
separates system
information from business
information
provides personal folders
for individual users
provides an area for
shared data.

8
8

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-6 Chapter 9 Examining the Environment Metadata

What Is SAS Management Console?


SAS Management Console provides the platform
administrator a primary point of control for administering
the platform for SAS Business Analytics.

9
9

SAS Management Console


The navigation area displays metadata objects. You
choose how to view them using the following two tabs:

Plug-ins Use the Plug-ins tab to view a list of all of


the installed plug-ins and the objects that are
associated with each plug-in. For example,
all server definitions are listed under the
Server Manager plug-in.
Folders Use the Folders tab to view all metadata
objects organized in the folder tree. The
items in the tree can be expanded or
collapsed, and you can drag and drop the
items. Some of the objects that are visible in
the plug-ins view might also be visible in the
folder view.
10
1
0

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.1 Reviewing the Platform for SAS Business Analytics 9-7

What Are Connection Profiles?


A connection profile is a file stored on the local machine
that contains the information that is necessary to connect
the SAS desktop application to your metadata server.
Windows Applications Java Applications

Connection Connection
SAS Information Map
Profile Profile
Studio
SAS Add-In for
Microsoft Office SAS Metadata
Server
SAS OLAP Cube Studio

Connection
Profile
SAS Enterprise
Guide SAS Management
Console

SAS Visual BI (JMP)


11
1
1

Connection Profiles Java Applications


When you open a Java application, you are typically
presented with a Connection Profile window.

The Connection Profile window enables a user


to do the following:
Open an existing profile stored on the machine

Create a new profile

If there are no profiles on the machine, the user


is prompted to create one before logging on.
12
1
2

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-8 Chapter 9 Examining the Environment Metadata

Connection Profiles Java Applications


Connection profiles for Java applications should only
be created, edited, or deleted using the Connection
Profile window.

13
1
3

Connection Profiles Windows Applications


SAS Enterprise Guide and the SAS Add-In for Microsoft
Office use common connection profile information.
Use the Connections window to manage profiles.
In SAS Enterprise Guide, select Tools Options
Administration.
In the SAS add-in,
select Tools
Connections on
the SAS tab.

14
1
4

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.1 Reviewing the Platform for SAS Business Analytics 9-9

Connection Profiles Windows Applications


Connection profiles for Windows applications should only
be created, edited, or deleted using SAS Enterprise Guide
or the SAS Add-In for Microsoft Office.

15
1
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-10 Chapter 9 Examining the Environment Metadata

9.2 Reviewing the Couse Environment and Metadata

Objectives
Review the classroom environment.
Review the Orion Star metadata users and groups.
Review the Orion Star metadata folder structure.
Review the concept of metadata roles and the
metadata roles created for Orion Star.

18
1
8

Classroom Environment (Review)


During this course, you use a classroom machine where
the SAS platform is installed and configured in a single-
machine environment.
The single-machine environment provides an easy way
for each student to learn how to interact with the SAS
platform without impacting other students.
The classroom environment includes the following
predefined elements in the SAS metadata:
Users for the various job roles

Groups

Metadata folders with data and report objects

A basic security model

19

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-11

Orion Star Metadata Users and Groups


(Review)
On the classroom image, metadata identities were
created for all of the SAS users at Orion Star.
Each Orion Star user is also part of one or more
metadata groups.

Users
Groups

Ellen

Henri
Sales

Marketing

20
2
0

Orion Star Metadata Roles (Review)


Metadata roles are defined to control which Orion Star
users have access to the various SAS application
features.
Example: Eric can access all of the features in
SAS Web Report Studio.
Henri has limited access to SAS Web Report
Studio and can view only existing reports.

21
2
1

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-12 Chapter 9 Examining the Environment Metadata

Orion Star Metadata Folders (Review)


SAS metadata folders are defined
for the Marketing and Sales
Departments at Orion Star.
Each department folder contains
subfolders for data, reports, and
other content.
A security model is defined to
control access to the SAS Folders
location and the SAS objects that
it contains.

22
2
2

Metadata Folder Permissions


On the classroom image, the platform administrator set up
the following permissions on the Orion Star folders for the
Marketing group:
Marketing Department Folder

ReadMetadata
WriteMetadata
WriteMemberMetadata
Read
Sales Department Folder

ReadMetadata is denied.
Security permissions are
inherited down the folder tree.

23
2
3

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-13

Metadata Permission Settings


The table below defines the metadata permission settings
used with the Orion Star folders.
ReadMetadata View an item or navigate
past a folder.

WriteMetadata Edit, delete, change


permissions, or rename
an item.
WriteMemberMetadata Add an item to a folder or
delete an item from a folder.

Read Read data.

24
2
4

Orion Star Metadata Roles


On the classroom image, the platform administrator
created two new roles. The Report Content Creators
group is a member of both of these roles.

Orion Star: Web Report Provides the members all of


Studio Full Control the capabilities of SAS Web
Report Studio.
Orion Star: Management Provides the member limited
Console Data and access to SAS Management
Folders Console plug-ins.
25
2
5

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-14 Chapter 9 Examining the Environment Metadata

Review the Metadata Defined on the Classroom Image

This demonstration shows you the metadata that was defined on the classroom image as well the metadata
that was created when you completed the demonstrations and exercises in this course.
1. Select Start All Programs SAS SAS Management Console 9.2.
2. Accept the default connection profile and click OK.
3. Type Ahmed in the User ID field and use the password provided by the instructor.

4. Click OK to close the Log On window and log on.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-15

SAS Management Console appears and displays all of the plug-ins and folders.

When you logged on to SAS Management Console earlier, you used Erics credentials. Because
of the Orion Star: Management Console Data and Folders role, Eric has limited access
to the capabilities of SAS Management Console. Ahmed is an unrestricted user and therefore
has complete access to all of the capabilities of SAS Management Console.
5. If necessary, click the Plug-ins tab.

The status bar indicates that Ahmed is an unrestricted user.

6. Compare the plug-ins available to Ahmed with those available to Eric:

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-16 Chapter 9 Examining the Environment Metadata

7. Select the User Manager plug-in.


Users, groups, and roles are displayed.

8. Clear the Show Users and Show Roles check boxes.


9. Double-click the Report Content Creators group.
10. Click the Members tab.
The users and groups that are members of the Report Content Creators group are displayed. Notice
that Eric and Jacques are members of this group.

11. Click Cancel.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-17

12. Click the Show Roles check box.


13. Clear the Show Groups check box.
14. Double-click the Orion Star: Web Report Studio Full Control role.
15. Click the Capabilities tab.
16. Double-click Web Report Studio 4.3.
17. Double-click Basic.
The icon indicates that all of the capabilities in the capabilities group are selected.

18. Click Cancel.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-18 Chapter 9 Examining the Environment Metadata

19. Double-click the Data Library Manager plug-in.


20. Double-click the Libraries folder.

21. Right-click the SASApp wrsdist library and select Properties.


The librarys Properties window appears.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-19

22. Click the Authorization tab.


23. Select Report Content Creators.
Notice the permissions that are granted. In order to create recipient lists in SAS Web Report Studio,
the user or the group that the user belongs to must have the following metadata permissions
on the SASApp - wrsdist library:
ReadMetadata
WriteMetadata
Read
Write

24. Click Cancel.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-20 Chapter 9 Examining the Environment Metadata

25. Click the Folders tab.

SAS Management Console provides access to several folders that are not available
in the other SAS platform applications.
26. Double-click Orion Star.
27. Double-click Marketing Department.
28. Double-click Stored Processes.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-21

29. Right-click Analysis of Product Orders by Gender and select Properties.


30. Select the Execution tab.

31. Select Manage.


The platform administrator clicked the Add button on this window to create the source code
repositories including the S:\Workshop\sbaft43 repository used during this course.

32. Click Cancel to close the Manage Source Code Repositories window.
33. Click Cancel to close the stored process Properties window.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-22 Chapter 9 Examining the Environment Metadata

34. Right-click the Marketing Department folder and click Properties.


35. Click the Authorization tab.
36. Select Marketing.

The permissions granted to the Marketing group enable the members in that group to view and access
the items in the folder as well as create new items and subfolders.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9.2 Reviewing the Couse Environment and Metadata 9-23

37. Click Sales.


The Sales group is denied all permissions, which means that the members of that group cannot see the
Marketing folder or any of its contents.

38. Click Cancel.


39. Double-click the following folders to expand them:
System Applications SAS Web Report Studio Common.
40. Select the BannerImages folder.
This is the location where the banner images used in SAS Web Report Studio are stored.

Images can be loaded by importing a SAS Package or by adding content from external files
or directories.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
9-24 Chapter 9 Examining the Environment Metadata

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Chapter 10 Learning More

10.1 SAS Resources ............................................................................................................. 10-3

10.2 Beyond This Course ..................................................................................................... 10-6

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10-2 Chapter 10 Learning More

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10.1 SAS Resources 10-3

10.1 SAS Resources

Objectives
Identify areas of support that SAS offers.
List additional resources.

3
3

Education
Comprehensive training to deliver greater value
to your organization.
more than 200 course offerings

world-class instructors

multiple delivery methods: instructor-led


and self-paced
training centers around the world

4
4 support.sas.com/training

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10-4 Chapter 10 Learning More

SAS Publishing
SAS offers a complete selection of publications to help
customers use SAS software to its fullest potential.
multiple delivery methods: e-books,
CD-ROM, and hard-copy books
wide spectrum of topics
partnerships with outside authors,
other publishers, and distributors

5
5 support.sas.com/publishing

SAS Global Certification Program


SAS offers several globally recognized certifications.
computer-based
certification exams
typically 60-70 questions
and 2-3 hours in length
preparation materials and
practice exams available
worldwide directory of
SAS Certified Professionals

6
6 support.sas.com/certify

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10.1 SAS Resources 10-5

Support
SAS provides a variety of self-help and assisted-help
resources.
SAS Knowledge Base

downloads and hot fixes

license assistance

SAS discussion forums


SAS Technical Support

7
7 support.sas.com/techsup

User Groups
SAS supports many local, regional, international,
and special-interest SAS user groups.
SAS Global Forum

online SAS community:


www.sasCommunity.org

8
8 support.sas.com/usergroups

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10-6 Chapter 10 Learning More

10.2 Beyond This Course

Objectives
Introduce the different types of SAS training.
Identify where to find the current classroom training
for the SAS platform.
Identify where to find the current e-learning for the
SAS platform.
Identify additional learning opportunities that follow
this course.

11
1
1

Education (Review)
Comprehensive training to deliver greater value to your
organization.
more than 200 course offerings

world-class instructors

multiple delivery methods: instructor-led


and self-paced
training centers around the world

1
2
12 support.sas.com/training

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10.2 Beyond This Course 10-7

Several Flavors of SAS Training


SAS Education provides a variety of training formats
designed to satisfy your learning style including the
following:
classroom

Live Web

e-Learning

on-site

mentoring

1
3
13 support.sas.com/training/options

Classroom Training
SAS Education provides training on all aspects of the
SAS System.

Training offerings
are organized by
job role-based
learning paths.

1
4
14 support.sas.com/paths

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10-8 Chapter 10 Learning More

Classroom Training Learning Paths


SAS Foundation

1
5
15 support.sas.com/foundationtraining continued...

Classroom Training Learning Paths


SAS Analytics

1
6
16 support.sas.com/training/analytics continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10.2 Beyond This Course 10-9

Classroom Training Learning Paths


SAS Enterprise Business Intelligence

1
7
17 support.sas.com/bitraining continued...

Classroom Training Learning Paths


SAS Data Management

1
8
18 support.sas.com/dmtraining continued...

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10-10 Chapter 10 Learning More

Classroom Training Learning Paths


SAS Administration

1
9
19 support.sas.com/admintraining

e-Learning
SAS e-Learning provides award-winning training when
and where you need it.

20 support.sas.com/elearn

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10.2 Beyond This Course 10-11

Next Steps
After this course, you will have access to extended
learning resources that include the following:
links to technical papers

links to SAS publishing documentation and books

information about which courses to take next

links to white papers, SAS Global Forum papers,


and much more

21
2
1

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Recommended SAS Titles
Creating Business Intelligence for Your Organization: Fast Track

Price
(U.S.
ISBN Title
Dollars)

SAS Press
978-1-59994-573-6 Basic Statistics Using SAS Enterprise Guide: A Primer $39.95

978-0-470-53968-2 SAS For Dummies , Second Edition $29.99

978-1-59994-726-6 The Little SAS Book for Enterprise Guide 4.2 $49.95

978-1-60764-833-8 Web Development with SAS by Example, Third Edition $49.95

SAS Documentation
978-1-59994-001-4 Base SAS 9.2 Guide to Information Maps $12.95

978-1-59047-106-7 Getting Started with SAS Enterprise Guide , Second Edition $16.95

978-1-59994-843-0 SAS Add-In 4.2 for Microsoft Office: Getting Started with Data Analysis $7.95

978-1-60764-777-5 SAS BI Dashboard 4.3: Users Guide $13.95

978-1-60764-909-0 SAS Data Integration Studio 4.3: Users Guide $67.95



978-1-59994-852-2 SAS 9.2 Intelligence Platform: Desktop Application Administration Guide $9.95

SAS 9.2 Intelligence Platform: Web Application Administration Guide,


978-1-60764-583-2 $48.95
Fourth Edition

978-1-59994-338-1 SAS 9.2 OLAP Server: Users Guide $43.95

978-1-60764-915-1 SAS 9.3 OLAP Server: Users Guide $33.95



SAS Information Map Studio 4.2: Getting Started with SAS Information
978-1-59994-790-7 $9.95
Maps

Notes
Prices are subject to change without notice.
To order, please visit support.sas.com/bookstore.
SAS documentation is available to search, browse, or print free online at: support.sas.com/documentation.

Copyright 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.

You might also like