You are on page 1of 25

Step 1:Go to visual Studio 2008 .

Select New project And Select Analysis Services Project

Step 2: IN visual studio 2008->Solution Explorer ->Analysis service Project8->shown in figure click on -> Right Click On Data Source Views And Select New Data Source.

Step: 3 Open Windows and Click On New Data Source.

Step:4 Click On Next Button

Step: 5 Click On New Button

Step: 6 Write Down Your Server Name /computer Name e.g PUNIT-PC AND SELECT DATABASE NORTHWIND AND Click Ok.

Step: 7 Then Click On Next Button and Select Inherit Option and Click Next and then Click on Finish. And then Cancel.

Step: 8 Opne Microsoft SQl Server 2008--> clicl on SQl Server Management Studio

Step: 9 Click On Connect Button

Step: 10 Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query

And Write Down Below Query and Then Execute. Step: 11 Create tbTime Table and copy below Query in it. USE [Northwind] GO

/****** Object: Table [dbo].[tblTime] Script Date: 03/01/2013 09:25:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON

GO CREATE TABLE [dbo].[tblTime]( [TimeKey] [int] IDENTITY(1,1) NOT NULL, [OrderDate] [datetime] NULL, [Year] [int] NULL, [Quarter] [int] NULL, [Month] [int] NULL ) ON [PRIMARY] GO INSERT INTO tblTime (OrderDate, [Year], [Quarter], [Month]) SELECT DISTINCT OrderDate, YEAR(OrderDate) AS [Year], DATENAME(QUARTER,OrderDate) AS Quarter , MONTH(OrderDate) AS [Month] FROM dbo.Orders ORDER BY [Year],[Quarter],[Month]

Step:12
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query.

CREATE TABLE [dbo].[tblFact] ( [OrderDate][datetime] NULL, [PostalCode] [varchar](10) NULL, [ProductID][int] NOT NULL, [EmployeeId][int] NULL, [ShipperId][int] NULL, [Total Sales][float] NULL, [Discount][float] NULL, [Unit Sales][int] NULL, [TimeKey][int] NULL )ON [PRIMARY] GO INSERT Into tblFact SELECT Orders.OrderDate, Customers.PostalCode, Products.ProductID, Orders.EmployeeID, Orders.ShipVia AS ShipperId, SUM([Order Details].UnitPrice * [Order Details].Quantity) AS [Total Sales],

SUM([Order Details].UnitPrice * [Order Details].Quantity * [Order Details].Discount ) AS Discount, SUM([Order Details].Quantity)AS [Unit Sales], tblTime.TimeKey FROM Orders INNER JOIN [Order Details] ON Orders.OrderID =[Order Details].OrderID INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID INNER JOIN Products ON [Order Details].ProductID = Products.ProductID INNER JOIN tblTime ON [Orders].OrderDate = tblTime.OrderDate GROUP BY Orders.OrderDate, Customers.PostalCode, Products.ProductID, Orders.EmployeeID , Orders.ShipVia, tblTime.TimeKey

Step 13:
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwEmployees AS SELECT EmployeeID, LastName + ','+ FirstName AS EmployeeName FROM Employees

Step: 14
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwGeography AS SELECT DISTINCT PostalCode, City, Region AS State, Country FROM Customers

Step: 15
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwProducts AS SELECT Products.ProductID, Products.ProductName, Categories.CategoryName FROM Products INNER JOIN Categories ON Products.CategoryID = Categories.CategoryID

Step: 16

Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwShippers AS SELECT ShipperId, CompanyName AS ShipperName FROM Shippers

Step: 17
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW dbo.vwSuppliers AS SELECT Products.ProductID, Products.ProductName, Suppliers.CompanyName AS SupplierName FROM Products INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID

Step: 18 Here Two table dbo.tbFACT and dbo.tbTIme Create in fig.

Step: 19 Here Five viewtable Create in fig.

Step: 20 Open Visual Studio -Select Data Source Views and Create New Data Source View

Step:21 Click On Next Button.

Step: 22 Select Table from and left and move to right shown in figure. And Click Next and then finish.

Step: 23 You can see this type of Image

Step: 24 Make a StarModel arrange star model in shown figure. And select column name and move for connection shown in figure.

Step: 25 Creating CUBE, IN visual studio 2008->Solution Explorer ->Analysis service Project8>shown in figure click on -> cube-> Select New Cube

Step: 26 Click On Next Button Shown in Figure.

Step 27: Click Next and then click On Suggest Button and Click on Next

Step :28 Uncheckmark tbTIme. And Click on Next Button

Step: 29 Uncheck Mark Tbl Fact Count and then click Next Button

Step: 30 Click Next and Finish

Step: 31 After Click on Finish This type of Figure Display.

Step: 32 Keep in mind if you forgot given a password During Sql Server So its give an error so follow this step 1.Right Click on Analysis Server Project->go to Properties->Select Deployment->Go to Server and Write Down localhost Or 1. Goto-> Control Panel\All Control Panel Items\Administrative Tools-> click on Local Services

Right Click And Go to -> Properties Select Logon Option and Ok and Apply Go to General and Restart

Step: 33 Right Click On Analysis Services Project8 and Deploy Project

Step: 34 Right Click On Analysis Services Project8 and Process Project

Step: 35 Click On Run and close and Close

Step:36

Step: 37 Double click on Northwind.cube

Step: 38 Right Click On Total Sales-> Add To Data Area

Step: 39 Go to Solution Explorer->Dimensions->Double Click on Vw Employees.dim.

Step: 40 Select EmployeeName from Data Source View And Drop to Attribute Section.

Step: 41 Go to Solution Explorer->Dimensions->Double Click on Vw Product.dim. Select Product Name from Data Source View And Drop to Attribute Section.

Step: 42 Go to Solution Explorer->Dimensions->Double Click on Tbl Time.dim. Select ALL from Data Source View And Drop to Attribute Section.

Step: 43 Drag and Drop Shown in Fig.

Step: 44 Go to Solution Explorer->Dimensions->Double Click on Vw Suppliers.dim. Select Supplier Name from Data Source View And Drop to Attribute Section.

Step: 45 Go to Solution Explorer->Dimensions->Double Click on Shippers.dim. Select Shippers Name from Data Source View And Drop to Attribute Section.

Step: 46 Right Click On Analysis Services Project8 and Deploy Project

Step: 47 Right Click On Analysis Services Project8 and Process Project

Step: 48 Click On Run and close and Close

Step: 50 Click On Northwind.Cube and Go to Cube Menu->Reconnect and Right Click and Clear Result

You might also like