Multidimensional Expression and its use in SAP BPC

SAPSAP BpC

MDX is a query language developed by Microsoft to query OLAP cubes. In OLAP cubes, data is structured as multidimensional. You have a fact table in middle and dimension tables surrounding fact tables. MDX is used to query STAR schema cubes like this and generate results for different purposes.

MDX query language is bit similar to SQL with few fundamental differences like:

In MDX queries, it can have 0, 1, 2,3,4…up to 128 query axes in the SELECT statement. Each axis behaves in exactly the same way, unlike SQL where there are significant differences between how the rows and the columns of a query behave.

MDX syntax distinguishes sets by surrounding tuples or members with braces, etc.

Example

Example of SELECT MDX query −

SELECT
{ [Measures].[Sales Amt],  
     [Measures].[Tax Amt] } ON COLUMNS,
{ [Date].[Fiscal].[Fiscal Year].&[2012],  
     [Date].[Fiscal].[Fiscal Year].&[2013] } ON ROWS
FROM [Sample Works]
WHERE ( [Region].[Southwest] ) 

For more details, you can navigate to Microsoft site link −

https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models/mdx/mdx-query-the-basic-query

raja
Updated on 12-Mar-2020 12:36:48

Advertisements