Upload
sandeep-kokre
View
222
Download
0
Embed Size (px)
DESCRIPTION
Bif Session13
Citation preview
7/18/2019 Bif Session13 Mdx
1/29
Slide 1 of 27
Business Intelligence Fundamentals
Ver 1.0
In this session, you will learn to:
Create MDX queries
Use MDX functions for analysis
Objectives
7/18/2019 Bif Session13 Mdx
2/29
Slide 2 of 27
Business Intelligence Fundamentals
Ver 1.0
The MDX query language is similar to Structured Query
anguage !SQ"#
It ena$les you to query multidimensional o$%ects, such as
&'( cu$es#
The following ta$le shows some of the common differences
$etween SQ and MDX#
Difference Beteen S!" and #D$
S!" !ueries #D$ !ueries
)or* with two dimensions )or* with multi+le dimensions
Use the SCT statement to definethe column layout and the )-.clause to define the row layout
Use the SCT clause to definemulti+le a/es and the )-. clause torestrict the data to a s+ecific dimensionor measure
Use the )-. clause to filter data Use the )-. clause to identify a+ortion of data from a different dimension
.eturn a su$set of two0dimensionaldata from ta$les
.eturn a su$set of multidimensional datafrom cu$es
(o+ulate a +redefinedtwo0dimensional rowset if they arecreated on one or more ta$les
(o+ulate a multidimensional dataset ifthey are created on a single cu$e
'ccess the SQ Ser1er data$ase thatcan $e connected from client
a++lications
'ccess the &'( cu$e data that can $econnected with the cu$e $rowser using
'D&MD and & D2 for &'(
7/18/2019 Bif Session13 Mdx
3/29
Slide % of 27
Business Intelligence Fundamentals
Ver 1.0
The following figure shows the difference in connecti1ity
$etween the SQ Ser1er data$ase and the &'( cu$e#
Difference Beteen S!" and #D$ &'ontd.(
7/18/2019 Bif Session13 Mdx
4/29
Slide ) of 27
Business Intelligence Fundamentals
Ver 1.03
4ey Conce+t in MDX
5 'n &'( cu$e consists of dimensionsand measures#
In the figure $elow, there are two dimensions: Time and6eogra+hy# The 6eogra+hy dimension has fi1e mem$ers: *frica,
*sia, *ustralia+,acific, -uroe, and /ort *merica# There is
one measure, !uantitSold, that is the num$er of items sold in
each continent $y year#
Time
6eogra+hy 7889 7888 ;;; ;;7 ;;
'frica 7; < = >
'sia 7 ? = 8
'ustralia@(acific 738 7799 73 77= 7
7/18/2019 Bif Session13 Mdx
5/29
Slide of 27
Business Intelligence Fundamentals
Ver 1.0?
Key Concepts in MDX (Contd.)
5 ' cellis the summariBed 1alues contained in the intersection of two
or more le1els#
5 In a two0dimensional 1iew of a cu$e, each cell can $e descri$ed in
terms of one mem$er from each dimension# or e/am+le, the
num$er of items sold in Aorth 'merica in ;; was 9,
7/18/2019 Bif Session13 Mdx
6/29
Slide of 27
Business Intelligence Fundamentals
Ver 1.0=
Key Concepts in MDX (Contd.)5 Dimensions in a cu$e are hierarchical# alues are deri1ed $y adding
or aggregatingthe original data in the cu$e to +roduce a+resummariBed re+ort#
*frica *sia *ustralia
+,acific
-uroe /ort
*merica
2002 !1 # #
7/18/2019 Bif Session13 Mdx
7/29Slide 7 of 27
Business Intelligence Fundamentals
Ver 1.0>
,roductDimension
8un 2001
3ime Dimension
'lotes
4eogra
Dimension
9nited
States
Tuples5 To identify and e/tract data, MDX uses a reference system named
tu+les#Tupleslist dimensions and mem$ers to identify indi1idualcells, as well as a larger section of cells in the cu$e# 2ecause each
cell is an intersection of all the dimensions of the cu$e, tu+les
uniquely
identify
e1ery
cell in
the cu$e#
&8un 2001: 9nited States: 'lotes(
7/18/2019 Bif Session13 Mdx
8/29Slide 6 of 27
Business Intelligence Fundamentals
Ver 1.09
Tuples (Contd.)5 Tu+les that encom+ass more than one cell are named slices#
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
'ell
4eogra ; -uroe
,roduct ; *ll ,roducts3ime ; *ll 3ime
4eogra ; -uroe
,roduct ; *ll ,roducts
3ime ; *ll 3ime
1st Dimension