Wednesday, 21 December 2016

MSBI -- MDX -- Part-3

MSBI -- MDX -- Part-3

MDX Query Basics :-

                                                    Lets see how to pull/Extract data from CUBE using basic MDX Query.

Example -1:-  How to see particular Measure Data
-- Sales Amount Measure
SELECT [Measures].[Sales Amount] ON COLUMNS
FROM [MSBI]


Above Query Can be re-written as below , i mean we can use AXIS(0) Instead of COLUMNS
-- Alternative Query
SELECT [Measures].[Sales Amount] ON AXIS(0)
FROM [MSBI]




Example -2:- Display Sales Amount Measure Data based on Country Wise
-- MDX Query with Measure and Attribute
SELECT [Measures].[Sales Amount] ON COLUMNS
      ,[Dim Customer].[English Country Region Name]ON ROWS
FROM [MSBI]





Example -3:- Display Sales Amount Measure Data based on Country Wise.The Only difference when we compared below query with above query is : The attribure has taken from Member Level not from Hierarchy Level.
-- MDX Query with Measure and Attribute
SELECT [Measures].[Sales Amount] ON COLUMNS
      ,[Dim Customer].[English Country Region Name].[English Country Region Name] ON ROWS
FROM [MSBI]














No comments:

Post a Comment