Professional Documents
Culture Documents
1 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
home
articles
quick answers
discussions
features
community
help
CPOL
Rate this:
Introduction
This article is created to help those technical newbies who want to learn creation of OLAP Cube in SSAS (SQL Server Analysis Services)
using Microsoft BIDS (Business Intelligence Development Studio) Environment and Data Warehouse. We will first take a glimpse at the
basic introduction to requirement of OLAP Cube, and then create OLAP Cube in SQL Server Analysis Service by following 10 easy steps.
Before preparing OLAP Cube, we need to create and populate our data warehouse. If you are totally new to Data Warehouse concepts,
please take a quick look at my previous article Create First Data Warehouse which can give you a brief idea on data warehouse
concepts which are used in this article.
6/11/2015 1:02 AM
2 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
Used by users who are associated with the decision making process,
e.g., Managers, CEO.
Basic Architecture
In our case, data warehouse is used as a source of data to Cube in BIDS. Once Cube gets ready with data, users can run queries on Cube
created in SSAS. SSRS Reports and Excel Pivoting/Power Pivot can use OLAP Cube as source of data instead of OLTP database to get
performance for resolving Complex Queries.
SSRS Reports, Excel Power Pivot can be used for visualization/analysis of data from cube.
Scenario
X-Mart is having different malls in our city, where daily sales take place for various products. Higher management is facing an issue while
decision making due to non availability of integrated data they cant do study on their data as per their requirement. So they asked us to
design a system which can help them quickly in decision making and provide Return on Investment (ROI).
So as a part of the design, we had completed designing of First Data Warehouse in my previous article. Now we have to Design / Create
OLAP Cube in SSAS, on which our reports can do a quick query and we can also provide self service BI capability to users later on.
6/11/2015 1:02 AM
3 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
Click on Start Menu -> Microsoft SQL Server 2008 R2 -> Click SQL Server Business Intelligence Development Studio.
6/11/2015 1:02 AM
4 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
5 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
6 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
7 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
8 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
4.3 Select Relational Data Source we have created previously (Sales_DW)-> Click Next
4.4 First move your Fact Table to the right side to include in object list.
6/11/2015 1:02 AM
9 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
Select FactProductSales Table -> Click on Arrow Button to move the selected object to Right Pane.
4.5 Now to add dimensions which are related to your Fact Table, follow the given steps:
Select Fact Table in Right Pane (Fact product Sales) -> Click On Add Related Tables
4.6 It will add all associated dimensions to your Fact table as per relationship specified in your SQL DW (Sales_DW).
Click Next.
6/11/2015 1:02 AM
10 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
11 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
12 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
5.4 Select Fact Table Name from Measure Group Tables (FactProductSales) -> Click Next
6/11/2015 1:02 AM
13 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
5.5 Choose Measures from the List which you want to place in your Cube --> Click Next
5.6 Select All Dimensions here which are associated with your Fact Table-> Click Next
6/11/2015 1:02 AM
14 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
5.8 Now your Cube is ready, you can see the newly created cube and dimensions added in your solution explorer.
6/11/2015 1:02 AM
15 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
16 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
17 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
8.3 In Solution Explorer, right click on Project Name (SalesDataAnalysis) -- > Click Deploy
8.4 Once Deployment will finish, you can see the message Deployment Completed in deployment Properties.
6/11/2015 1:02 AM
18 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
6/11/2015 1:02 AM
19 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
9.3 Once processing is complete, you can see Status as Process Succeeded -->Click Close to close both the open windows for
processing one after the other.
6/11/2015 1:02 AM
20 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
10.2 Drag and drop measures in to Detail fields, & Drag and Drop Dimension Attributes in Row Field or Column fields.
Now to Browse Our Cube
1. Product Name Drag & Drop into Column
2. Full Date UK Drag & Drop into Row Field
3. FactProductSalesCount Drop this measure in Detail area
We will see some more features shortly - how can we assign user friendly names, named calculations, named query, ordering on hierarchy,
hiding dimension attributes, creating perspective, KPI, security roles, etc.
Friends, if you liked my article, please do not forget to vote for me.
Enjoy SQL Intelligence.
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Share
6/11/2015 1:02 AM
21 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
Search Comments
Profile popups
Spacing Relaxed
Layout Normal
Per page 25
Update
Superb
Member 12101055
1-Nov-15 7:07
6/11/2015 1:02 AM
22 of 22
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-i...
Great Article
leketekoa
28-Oct-15 2:44
Member 3276162
13-Oct-15 2:46
My vote of 5
Member 12000196
21-Sep-15 4:49
My vote of 5
ham rez
Doubt
BI Rajesh
6-Sep-15 0:20
My vote of 5
John Titi
8-Aug-15 19:00
My vote of 5
224917
27-Jul-15 5:11
HTSoft
11-Jun-15 19:37
Nice article
Member 4169279
10-Jun-15 22:55
Member 11357942
24-May-15 23:02
useful article
Member 11686114
17-May-15 19:00
Very Helpfull
Brijmohans30
10-May-15 21:14
Good Explanation
Jamal Ansari
9-May-15 22:28
Excellent article!
Member 11645044
27-Apr-15 2:50
Excelente artculo!!!!
gisycu
22-Apr-15 8:38
--
Member 11629004
22-Apr-15 2:02
Prashant Dave
Excellent Article
Member 11551845
invincible021
General
News
24-Mar-15 7:47
10-Mar-15 19:13
Member 11584809
6-Apr-15 10:01
sumit.rastogiii
9-Mar-15 5:34
Mubin M. Shaikh
9-Mar-15 7:57
Question
24-Feb-15 0:04
Member 11075911
Suggestion
15-Apr-15 21:04
Member 8731611
14-Sep-15 20:04
8-Jul-15 6:49
Refresh
Bug
Answer
Joke
1 2 3 4 5 6 Next
Praise
Rant
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151103.1 | Last Updated 21 Jul 2014
Select Language
Layout: fixed |
fluid
6/11/2015 1:02 AM