Thursday 16 July 2015

Basic syntax of Writing MDX query



Hey Guys,

In this post I would like to explain the Basic syntax of Writing MDX query.


Introduction  :

MDX stands for 'multi-dimensional expressions'. It is the main query language implemented by Mondrian.

MDX was introduced by Microsoft with Microsoft SQL Server OLAP Services in around 1998, as the language component of the OLE DB for OLAP API.

More recently, MDX has appeared as part of the XML for Analysis API. Microsoft proposed MDX as a standard, and its adoption among application writers and other OLAP providers is steadily increasing.


Syntax:                
SELECT {set 0} on COLUMNS,                      /* block comment */

{set 1} on ROWS                                               // line comment

FROM [cube]

WHERE (tuple) 


Note:

  •   No axes or the WHERE statement can share any of the same dimensions
  •   FROM clause can name only one cube at a time
  •   The WHERE clause describes the slicer axes

Dimension Representation:
-              [<dimension_name>.<hierarchy_name>].[<level1>].[<level2>]...[<leveln>].MEMBERS

-  [<dimension_name>.<hierarchy_name>].[<level1>].[<level2>]...[<level_n-1>].[<MEMBERNAME>]

If you have any question you can ask me or else you can drop me email :
 
Sumit Bansal
BI Developer
 

 

No comments :

Post a Comment