0% found this document useful (0 votes)
77 views

Assignment 3 DM in SSAS

This document provides an overview of lessons for defining and deploying a cube in SQL Server Analysis Services using SQL Server Data Tools (SSDT). The lessons cover defining dimensions and a cube, adding attributes, reviewing cube properties, deploying the project to an Analysis Services instance, and browsing the cube data. Deploying creates the objects on the Analysis Services server, while processing populates the objects with data from the data source. The tutorial aims to teach how to model multidimensional data for analysis using Adventure Works Cycles sample data.

Uploaded by

sd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Assignment 3 DM in SSAS

This document provides an overview of lessons for defining and deploying a cube in SQL Server Analysis Services using SQL Server Data Tools (SSDT). The lessons cover defining dimensions and a cube, adding attributes, reviewing cube properties, deploying the project to an Analysis Services instance, and browsing the cube data. Deploying creates the objects on the Analysis Services server, while processing populates the objects with data from the data source. The tutorial aims to teach how to model multidimensional data for analysis using Adventure Works Cycles sample data.

Uploaded by

sd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Multidimensional Modeling (Adventure Works

Tutorial)
5/16/2018 • 2 minutes to read • Edit Online

APPLIES TO: SQL Server Analysis Services Azure Analysis Services


Welcome to the Analysis Services Tutorial. This tutorial describes how to use SQL Server Data Tools to develop
and deploy an Analysis Services project, using the fictitious company Adventure Works Cycles for all examples.

What you learn


In this tutorial, you will learn the following:
How to define data sources, data source views, dimensions, attributes, attribute relationships, hierarchies,
and cubes in an Analysis Services project within SQL Server Data Tools.
How to view cube and dimension data by deploying the Analysis Services project to an instance of
Analysis Services, and how to then process the deployed objects to populate them with data from the
underlying data source.
How to modify the measures, dimensions, hierarchies, attributes, and measure groups in the Analysis
Services project, and how to then deploy the incremental changes to the deployed cube on the
development server.
How to define calculations, Key Performance Indicators (KPIs), actions, perspectives, translations, and
security roles within a cube.
A scenario description accompanies this tutorial so that you can better understand the context for these lessons.
For more information, see Analysis Services Tutorial Scenario.

Prerequisites
You will need sample data, sample project files, and software to complete all of the lessons in this tutorial. For
instructions on how to find and install the prerequisites for this tutorial, see Install Sample Data and Projects for
the Analysis Services Multidimensional Modeling Tutorial.
Additionally, the following permissions must be in place to successfully complete this tutorial:
You must be a member of the Administrators local group on the Analysis Services computer or be a
member of the server administration role in the instance of Analysis Services.
You must have Read permissions in the AdventureWorksDW sample database. This sample database is
valid for the SQL Server 2017 release.

Lessons
This tutorial includes the following lessons.

LESSON ESTIMATED TIME TO COMPLETE

Lesson 1: Defining a Data Source View within an Analysis 15 minutes


Services Project
Open Visual Studio.
Lesson 2: Defining and Deploying a Cube
5/16/2018 • 2 minutes to read • Edit Online

APPLIES TO: SQL Server Analysis Services Azure Analysis Services


After you define a data source view in your Microsoft Analysis Services project, you are ready to define an initial
Analysis Services cube.
You can define a cube and its dimensions in a single pass using the Cube Wizard. Alternatively, you can define one
or more dimensions and then use the Cube Wizard to define a cube that uses those dimensions. If you are
designing a complex solution, you generally start by defining the dimensions. For more information, see
Dimensions in Multidimensional Models or Cubes in Multidimensional Models.

NOTE
Completed projects for all of the lessons in this tutorial are available online. You can jump ahead to any lesson by using the
completed project from the previous lesson as a starting point. Click here to download the sample projects that go with this
tutorial.

This lesson contains the following tasks:


Defining a Dimension
In this task, you use the Dimension Wizard to define a dimension.
Defining a Cube
In this task, you use the Cube Wizard to define an initial Analysis Services cube.
Adding Attributes to Dimensions
In this task, you add attributes to the dimensions that you created.
Reviewing Cube and Dimension Properties
In this task, you review the structure of the cube that you defined by using the Cube Wizard.
Deploying an Analysis Services Project
In this task, you deploy the Analysis Services project to your local instance of Analysis Services, and learn about
certain deployment properties.
Browsing the Cube
In this task, you browse the cube and dimension data by using Excel or the MDX query designer.

Next Lesson
Lesson 3: Modifying Measures, Attributes and Hierarchies

See Also
Analysis Services Tutorial Scenario
Multidimensional Modeling (Adventure Works Tutorial)
Dimensions in Multidimensional Models
Cubes in Multidimensional Models
Configure Analysis Services Project Properties (SSDT)
Build Analysis Services Projects (SSDT)
Lesson 2-5 - Deploying an Analysis Services Project
5/16/2018 • 3 minutes to read • Edit Online

APPLIES TO: SQL Server Analysis Services Azure Analysis Services


To view the cube and dimension data for the objects in the Analysis Services Tutorial cube in the Analysis Services
Tutorial project, you must deploy the project to a specified instance of Analysis Services and then process the cube
and its dimensions. Deploying an Analysis Services project creates the defined objects in an instance of Analysis
Services. Processing the objects in an instance of Analysis Services copies the data from the underlying data
sources into the cube objects. For more information, see Deploy Analysis Services Projects (SSDT) and Configure
Analysis Services Project Properties (SSDT).
At this point in the development process, you generally deploy the cube to an instance of Analysis Services on a
development server. Once you have finished developing your business intelligence project, you will generally use
the Analysis Services Deployment Wizard to deploy your project from the development server to a production
server. For more information, see Multidimensional Model Solution Deployment and Deploy Model Solutions
Using the Deployment Wizard.
In the following task, you review the deployment properties of the Analysis Services Tutorial project and then
deploy the project to your local instance of Analysis Services.
To deploy the Analysis Services project
1. In Solution Explorer, right-click the Analysis Services Tutorial project, and then click Properties.
The Analysis Services Tutorial Property Pages dialog box appears and displays the properties of the
Active(Development) configuration. You can define multiple configurations, each with different properties.
For example, a developer might want to configure the same project to deploy to different development
computers and with different deployment properties, such as database names or processing properties.
Notice the value for the Output Path property. This property specifies the location in which the XMLA
deployment scripts for the project are saved when a project is built. These are the scripts that are used to
deploy the objects in the project to an instance of Analysis Services.
2. In the Configuration Properties node in the left pane, click Deployment.
Review the deployment properties for the project. By default, the Analysis Services Project template
configures an Analysis Services project to incrementally deploy all projects to the default instance of
Analysis Services on the local computer, to create an Analysis Services database with the same name as the
project, and to process the objects after deployment by using the default processing option. For more
information, see Configure Analysis Services Project Properties (SSDT).

NOTE
If you want to deploy the project to a named instance of Analysis Services on the local computer, or to an instance
on a remote server, change the Server property to the appropriate instance name, such as <ServerName>\
<InstanceName>.

3. Click OK.
4. In Solution Explorer, right-click the Analysis Services Tutorial project, and then click Deploy. You might
need to wait.
NOTE
If you get errors during deployment, use SQL Server Management Studio to check the database permissions. The
account you specified for the data source connection must have a login on the SQL Server instance. Double-click the
login to view User Mapping properties. The account must have db_datareader permissions on the
AdventureWorksDW2012 database.

SQL Server Data Tools (SSDT) builds and then deploys the Analysis Services Tutorial project to the
specified instance of Analysis Services by using a deployment script. The progress of the deployment is
displayed in two windows: the Output window and the Deployment Progress – Analysis Services
Tutorial window.
Open the Output window, if necessary, by clicking Output on the View menu. The Output window
displays the overall progress of the deployment. The Deployment Progress – Analysis Services Tutorial
window displays the detail about each step taken during deployment. For more information, see Build
Analysis Services Projects (SSDT) and Deploy Analysis Services Projects (SSDT).
5. Review the contents of the Output window and the Deployment Progress – Analysis Services Tutorial
window to verify that the cube was built, deployed, and processed without errors.
6. To hide the Deployment Progress - Analysis Services Tutorial window, click the Auto Hide icon (it
looks like a pushpin) on the toolbar of the window.
7. To hide the Output window, click the Auto Hide icon on the toolbar of the window.
You have successfully deployed the Analysis Services Tutorial cube to your local instance of Analysis Services, and
then processed the deployed cube.

Next Task in Lesson


Browsing the Cube

See Also
Deploy Analysis Services Projects (SSDT)
Configure Analysis Services Project Properties (SSDT)
Lesson 2-6 - Browsing the Cube
5/16/2018 • 2 minutes to read • Edit Online

APPLIES TO: SQL Server Analysis Services Azure Analysis Services


After you deploy a cube, the cube data is viewable on the Browser tab in Cube Designer, and the dimension data
is viewable on the Browser tab in Dimension Designer. Browsing cube and dimension data is way to check your
work incrementally. You can verify that small changes to properties, relationships, and other objects have the
desired effect once the object is processed. While the Browser tab is used to view both cube and dimension data,
the tab provides different capabilities based on the object you are browsing.
For dimensions, the Browser tab provides a way to view members or navigate a hierarchy all the way down to the
leaf node. You can browse dimension data in different languages, assuming you have added the translations to
your model.
For cubes, the Browser tab provides two approaches for exploring data. You can use the built-in MDX Query
Designer to build queries that return a flattened rowset from a multidimensional database. Alternatively, you can
use an Excel shortcut. When you start Excel from within SQL Server Data Tools, Excel opens with a PivotTable
already in the worksheet and a predefined connection to the model workspace database.
Excel generally offers a better browsing experience because you can explore cube data interactively, using
horizontal and vertical axes to analyze the relationships in your data. In contrast, the MDX Query Designer is
limited to a single axis. Moreover, because the rowset is flattened, you do not get the drilldown that an Excel
PivotTable provides. As you add more dimensions and hierarchies to your cube, which you will do in subsequent
lessons, Excel will be the preferred solution for browsing data.
To browse the deployed cube
1. Switch to Dimension Designer for the Product dimension in SQL Server Data Tools (SSDT). To do this,
double-click the Product dimension in the Dimensions node of Solution Explorer.
2. Click the Browser tab to display the All member of the Product Key attribute hierarchy. In lesson three,
you will define a user hierarchy for the Product dimension that will let you browse the dimension.
3. Switch to Cube Designer in SQL Server Data Tools (SSDT). To do this, double-click the Analysis Services
Tutorial cube in the Cubes node of Solution Explorer.
4. Select the Browser tab, and then click the Reconnect icon on the toolbar of the designer.
The left pane of the designer shows the objects in the Analysis Services Tutorial cube. On the right side of
the Browser tab, there are two panes: the upper pane is the Filter pane, and the lower pane is the Data
pane. In an upcoming lesson, you will use the cube browser to do analysis.

Next Lesson
Lesson 3: Modifying Measures, Attributes and Hierarchies

See Also
MDX Query Editor (Analysis Services - Multidimensional Data)
Lesson 3-5 - Browsing the Deployed Cube
5/16/2018 • 2 minutes to read • Edit Online

APPLIES TO: SQL Server Analysis Services Azure Analysis Services


In the following task, you browse the Analysis Services Tutorial cube. Because our analysis compares measure
across multiple dimensions, you will use an Excel PivotTable to browse your data. Using a PivotTable lets you place
customer, date, and product information on different axes so that you can see how Internet Sales change when
viewed across specific time periods, customer demographics, and product lines.
To browse the deployed cube
1. To switch to Cube Designer in SQL Server Data Tools, double-click the Analysis Services Tutorial cube in
the Cubes folder of the Solution Explorer.
2. Open the Browser tab, and then click the Reconnect button on the toolbar of the designer.
3. Click the Excel icon to launch Excel using the workspace database as the data source. When prompted to
enable connections, click Enable.
4. In the PivotTable Field List, expand Internet Sales, and then drag the Sales Amount measure to the
Values area.
5. In the PivotTable Field List, expand Product.
6. Drag the Product Model Lines user hierarchy to the Columns area.
7. In the PivotTable Field List, expand Customer, expand Location, and then drag the Customer Geography
hierarchy from the Location display folder in the Customer dimension to the Rows area.
8. In the PivotTable Field List, expand Order Date, and then drag the Order Date.Calendar Date hierarchy
to the Report Filter area.
9. Click the
the arrow
arrowtotothe
theright
rightofofthethe Order
Order Date.Calendar
Date.Calendar Date Date
filter infilter in thepane,
the data dataclear
pane,the
clear thebox
check check
for box for
the (All)
level, expand 2013, expand H1 CY 2013, expand Q1 CY 2013 select the check box for February
the (All) level, expand 2006, expand H1 CY 2006, expand Q1 CY 2006, select the check box for February 2013, and then
click OK.
2006, and then click OK.
10. Take a screenshot of the Excel output, paste it into a word file, and submit to Canvas.
Internet sales by region and product line for the month of February, 2006 appear as shown in the following
image.

You might also like