SAS Enterprise Guide & Microsoft Excel Add-In

advertisement
I.
A Weekly Report Development
by using SAS EG
II. MS Excel SAS Add-In
Frank Chen
Loyalty & Insights Analyst
Lawtons Drugs/National Sobeys Pharmacy
Sobeys/Lawtons Customer view
roadmap : Transaction + Digital
Enhanced Single
customer view
Information collected
Current state
Customer foot print in store
Level of Insights
Project Pineapple : Online
shopping / browsing & transaction
Customer’s social activity,
preferences, Social group affinities
Mobile activity, personalized
offers response
I know you don’t
drink coffee often.
But it’s Friday.
Wanna try one?
For you, it’s free
of charge.
Shopping behavior, marketing
response, demo, geographic &
household
Store level transaction
Yet to start
In progress
Completed
Business case:
Enhancing shopper’s view to get the big picture
Integrating social + Web data + with CIS & Advanced Analytics = huge potential !!!
CIS: Shopper’s transaction and loyalty data
Advanced Analytics
Superior customer experience
Enhanced MOE offer
New data element :
Social profile : Voice of shopper
Enriched foundation segmentation & SCV
Improved Merchandising
Better Assortment
Better communication mechanisms
Input
P
r
o
c
e
s
s
B
e
n
e
f
i
t
s
Monitoring of customer’s engagement with competitors
Business Intelligence
How business world benefited from the ideas in other
fields …
A couple of examples:





Classic statistical techniques
Decision trees
Artificial neural networks
Nearest neighbor approaches: application of Memory-based reasoning
Survival analysis: adopted from medical research
• Very valuable for understanding customers: When to worry
customer leaving? When will a customer come back? How to
improve the customer retention?
• Differences from the medical research:
1. The consequences of marketing actions vs. the medical research
2. The volumes of data are so large that statistical concern s about
confidence and accuracy are replaced by concerns about
managing large volumes of data
Basic steps to develop a EG project
-using Sobeys CIS database as case study
1. Think about the data needed to accomplish the goal and draw a
diagram of the data flow if possible
2. Choose the method that will occupy the least database resources
3. Create new fields accordingly if output template is available
4. Expect modification/improvement in the future
Expected output data template
Once we get the above output data, further analysis can be done in Excel
(for example, pivot table can be a common option in this case).
Now go to SAS EG
Ordered Lists
We would expect this weekly
report as automated as possible
because this is a routine weekly
trend report for monitoring
purpose.
Just click the button?
Almost, but you may want to
give the orders to the
machine
 One-time manual
work behind. Then
we can enjoy the
automation.
Final output data
Start a new project
Start a new project
 Connect with the desired server,
either a remote server or a local
workstation. If all the data are stored
in your own computer, then make sure
all the data are loaded into SAS
libraries.
 Drag/double click the tables you
need in the project.
This is pretty flexible. You don’t
have to introduce any tables to the
project if you choose to start with a
SAS program.
Fiscal week (Sunday-Saturday): This part
separates the carded customers from
un-carded customers. Three aggregated
levels are available: department level,
front store total, and overall store total.
Fiscal week: This is for overall sales
metrics no matter if the customer
scanned their air miles cards or not.
Flyer week (Friday-Thursday):
Decided to use a program instead after
the flyer-week data is available.
Fiscal week data (Sunday-Saturday): Three aggregated levels are
available: department level, front store total, and overall store total.
Flyer week data
(Friday-Thursday)
Time query table with new
developed primary key
Edit filter
Add tables &
Join tables
Combine filter
How to link table, query, query
builder, and SAS program
together?
 Some links are created automatically when
you run a query builder or a SAS program, or
when you design a new query builder.
 For those have logical context relationships,
but there is no link between them, you can link
them with each other manually.
Why EG Project?
 You don’t have to be a SAS programming user to
create an EG project.
 It allows the visualization of the whole data mining
evolution. And it is quite flexible in terms of what can
be included in a SAS project
 It is quite straightforward to find out when there is
error during the developing process.
 It is a great tool when you are in the developing
stage of new projects, such as a new periodic report
or an Ad Hoc analysis, which are subject to
continuous /further upgrading/improvement.
 Such a EG project can be
replaced by a single SAS
program depending on specific
circumstances.
 If this turns to be a mature
routine report, you may
consider to create a stored
process (or called STP). This
may enable your colleagues
without any SAS knowledge to
run the report instead.
Easy Use of Excel SAS Add-in
• SAS Add-in
– Shown as a Tab in Excel Ribbon: enable colleagues without any
SAS experiences to run SAS stored process (STP) reports, an easy
access to data
• Stored Process
A SAS program that is hosted on a server
and described by metadata. Stored
processes can be written by anyone who is
familiar with the SAS programming language or
with the aid of a SAS code generator such as SAS
EG.
Stored processes
automate the creation
of periodic routine
reports
Thus the workload can
be transferred to the
direct stakeholders
once the STP is
developed and stored
in the desired SAS
server
Excel SAS Add-in
Use stored processes to generate reports in Excel
Configure SAS MS-Office Add-in 5.1 Through Excel 2010:
If you use Stored Processes to generate reports, please confirm you have the “SAS”
menu option in Excel 2010. If not, then the new SAS MS-Office Add-In needs to be
installed – contact the Help Desk to arrange for installation.
1. Select SAS from the menu, then Tools, then Connections (see below)
Excel SAS Add-in
Use stored processes to generate reports in Excel
2. Select the Server you wish to edit and click Modify. If no servers exist
in your list, click Add (See below). Once complete, be sure to click the Set
Active button.
Excel SAS Add-in
Use stored processes to generate reports in Excel
3. You are now ready to use the SAS MS-Office Add-In to run Stored
Processes. Just click on the Reports icon within Excel, choose the
regional folder and select a report you wish to run. See Lawtons
examples in the next slide:
Run stored processes
Any questions?
Thank you!
Download