19
SSAS, MDX , Cube understanding, Browsing and Tools information

SSAS, MDX , Cube understanding, Browsing and Tools information

Embed Size (px)

Citation preview

Page 1: SSAS, MDX , Cube understanding, Browsing and Tools information

SSAS, MDX , Cube understanding, Browsing and Tools information

Page 2: SSAS, MDX , Cube understanding, Browsing and Tools information

About Me - Vishal Pawar

• 8 + years of experience in Microsoft BI Stack• Microsoft BI Solution Architect in The Most Group• BI Consulting partner of Right Click Info • Professional Microsoft BI Trainer at Mentalist Network • NMUG Community Leader , Speaker • Microsoft Community Representative for Navi Mumbai region.• SQL PASS Chapter Lead for Mumbai & Navi Mumbai • MCTS: Microsoft® Certified Technology Specialist -SQL Server

2008,Business Intelligence Development and Maintenance• MCSA: Microsoft® Certified Solutions Associate• CSM: Certified Scrum Master from Scrum Alliance, US• SQL Server Expert and 3 Complex SQL tool innovator on Codplex• BE-Computer Science & Engineering , RAIT , Mumbai Univercity• MBA-Information System, Arianth College , Pune• Blogging @ http://bimentalist.com , http://sqlmentalist.com• BI Articles :: 350+ , SQL Article – 400+, SQL Script – 350+

Page 3: SSAS, MDX , Cube understanding, Browsing and Tools information

Why we need SSAS Cube

3

What is SSAS Cube

Way to access Cube

What is Dimension and Attributes

3

4

Presentation Agenda

3

2

1

QHP Dimension and Attributes

Process Flow and QHP Cube Browsing

MDX Basics

MDX Tools

5

6

7

8

Comparison of Queries Written in T-SQL and MDX with Construct 9

MDX – How to add where condition10

33

SSRS Reports with SSAS Cube 11

Page 4: SSAS, MDX , Cube understanding, Browsing and Tools information

Why we need SSAS Cube

4

• Time in Processing• Time in Development• Dynamic structure • Ad hoc Reporting• Query Summery Slow• Reporting Time Consuming

Page 5: SSAS, MDX , Cube understanding, Browsing and Tools information

5

What is SSAS Cube

• The Multi-Dimensional Data Model consists of:

a data cube, which is a multi-dimensional data structure consisting of dimensions (which contain members) and measures; within a dimension, members may be in a hierarchical relationship

• A set of operations to query cells of the cube using dimension members as coordinates

• Rules that dictate how measure values are rolled up (or aggregated) within hierarchies or how certain cells are computed in a sparse cube

Page 6: SSAS, MDX , Cube understanding, Browsing and Tools information

Way to access Cube

6

•Business Intelligence Development Studio (BIDS): BIDS is used to access the cube and preview the data at the design time. This option is useful only for the developer community and is not applicable to business analysts and decision makers. BIDS was replaced by the SQL Server Data Tools in SQL Server 2012, but has much of the same functionality.

•SQL Server Management Studio (SSMS): SSMS is used to access the cube by people in different roles. It is used to access the cube by the development/testing teams to validate the data. Those business analysts and decision makers (very few) who are familiar with SSMS; also use it for accessing the cubes.

•Microsoft Office Excel: Excel being one of the most widely used data analysis tool, has the capability to connect to cubes and perform different kinds of reporting such as pivot tables, charts, etc. It is used by many decision makers, business analysis, and even developers for reporting purposes.

•SQL Server Reporting Services (SSRS): SSRS allows Analysis Services databases or cubes as a data source to build reports. This option is available both in BIDS\SQL Server Data Tools while building canned reports and in Report Builder while doing ad-hoc reporting.

•PerformancePoint Services (PPS): PPS which is now a part of SharePoint 2010 allows building KPIs, scorecards, reports, and dashboards with Analysis Services cubes as data source.

Page 7: SSAS, MDX , Cube understanding, Browsing and Tools information

What is Dimension and Attributes

7

Page 8: SSAS, MDX , Cube understanding, Browsing and Tools information

QHP Dimension and Attributes

8

Page 9: SSAS, MDX , Cube understanding, Browsing and Tools information

Dimension and Attributes

9

Page 10: SSAS, MDX , Cube understanding, Browsing and Tools information

Process Flow

10

Reads XML filewhere user has input theReport preferences

Creates dynamic

MDX query based on

user’s report

preferences input

Retrieve datafrom Cubeaccordingly

Dynamic Excel Report

created based on user’s

report Preferences

Need to edit report ?

Click on Excel add-in

for editing the user

preferences.

Edit – View of report

XML File

Run Application

Modifies theUser preference XML withnecessary changesdone by user

XML FileAdd/Delete /Change

the required field and

Calculations.

Click on “Report View”

Add-in to view report

Page 11: SSAS, MDX , Cube understanding, Browsing and Tools information

QHP Cube Browsing with SSMS

11

DEMO

Page 12: SSAS, MDX , Cube understanding, Browsing and Tools information

MDX Tools

12

http://www.sqlbi.com/tools/mdx-studio/Click above link to download

Page 13: SSAS, MDX , Cube understanding, Browsing and Tools information

Comparison of Queries Written in T-SQL & MDX - Construct

--TSQL Count Select Count(1) from vwDimCompositeQuestionAssoc

--MDX CountSELECT NON EMPTY{[Measures].[Vw Dim Composite Question Assoc Count]} ON COLUMNSFROM [QHPAnalysis]

Now lets Convert Complex TSQL in to MDX

Select que.QuestionText,fct.TopBoxCountfrom FctQuestionSurvey fctinner join DimQuestionSample queon que.QuestionID=fct.QuestionIDWhere Fct.SurveyID=80101878 and que.QuestionText='In the last 6 months, did you get information or help from your health plan''scustomer service?'

Page 14: SSAS, MDX , Cube understanding, Browsing and Tools information

--Syntax for Join and Where Condition in MDX

SELECTNON EMPTY

{--Column Selection }

ON COLUMNS,NON EMPTY

{--Row Selection

}ON ROWS

FROM(

SELECT{--Where Condition Column Selection

} ON COLUMNSFROM(

SELECT{--Where Condition Row Selection

} ON COLUMNSFROM[Cube Name ]

))WHERE

--Where Condition on Row Selection

Syntax for Join and Where Condition in MDX

Page 15: SSAS, MDX , Cube understanding, Browsing and Tools information

SELECT

NON EMPTY

{[Measures].[Top Box Count]}

ON COLUMNS

,

NON EMPTY

{[Dim Question Sample].[Question Text].[Question Text].ALLMEMBERS }

ON ROWS

FROM

(

SELECT

{

[Dim Question Sample].[Question Text].&[In the last 6 months, did you get information or help from your

health plan's customer service?]

} ON COLUMNS

FROM

(

SELECT

{[Dim Project Survey].[Survey ID].&[80101878]} ON COLUMNS

FROM [QHPAnalysis]

)

)

WHERE

[Dim Project Survey].[Survey ID].&[80101878];

Page 16: SSAS, MDX , Cube understanding, Browsing and Tools information

More example TSQL and MDX Comparison

http://www.mssqltips.com/

Comparison of Queries Written in T-SQL and SQL Server MDX

Link -http://www.mssqltips.com/sqlservertip/2916/comparison-of-queries-written-in-tsql-and-sql-server-mdx/

Explain in 7 different example

Page 17: SSAS, MDX , Cube understanding, Browsing and Tools information

MDX how to add where condition

17

Demo

Page 18: SSAS, MDX , Cube understanding, Browsing and Tools information

SSRS Reports with SSAS Cube

18

Page 19: SSAS, MDX , Cube understanding, Browsing and Tools information

Basic SSAS tutorial

19

MSBI # 1– BI # 1-Its always start with the introduction MSBI # 2– BI # 2- Lets play with Business Intelligence Development Studio (BIDS) MSBI # 9– BI # 3 – Architectural Overview of SSIS,SSRS and SSAS . MSBI # 5 – SSAS # 1- What is SSAS ? – (SQL Server Analysis Services) MSBI # 8 – SSAS # 2- Get familiar with BIDS–SSAS ? – (SQL Server Analysis Services) MSBI # 17 – SSAS # 3 – Lets Get Start with SSAS ,Features and Project Start up MSBI # 18 – SSAS # 4 – Building a Cube and Dimension Using SSMS–SSAS Wizards MSBI # 19 – SSAS # 5 – How to Defining a Data Source and Data Source View MSBI # 20 – SSAS # 6 – How Defining a Cube in SSAS MSBI # 21 – SSAS # 7 – Understanding the Cube Designer Tabs in SSAS MSBI # 27 – SSAS # 8 – Deploying an Analysis Services Project MSBI # 28 – SSAS # 9 – Modifying Measures, Attributes and Hierarchies in SSAS MSBI # 34 – SSAS # 10 – How to Defining Actions in SSAS MSBI # 41 – SSAS # 11 – How to Defining Calculations in SSAS MSBI # 42 – SSAS # 12 – How to Defining Key Performance Indicators (KPIs) in SSAS MSBI # 43 – SSAS # 13 – How Defining Actions in SSAS MSBI # 56 – SSAS # 14 – How to Defining Perspectives and Translations in SSAS MSBI # 58 – SSAS # 15 – How to Defining Administrative Roles in SSAS