ssas mdx
Retrieving information from a Tabular database is easy – just query it with some basic DAX functions! In this article, we will learn how to query a Tabular model with some of the MDX expressions, examine the results from DAX querying and analyze data from the tables.
从表格数据库中检索信息很容易–只需使用一些基本的DAX函数即可查询信息 ! 在本文中,我们将学习如何使用某些MDX表达式查询表格模型,检查DAX查询的结果以及分析表中的数据。
要求 (Requirements)
The prerequisites for querying with MDX are SQL Server Management Studio 2014 or higher with an installed SSAS Tabular instance and deployed SSAS Tabular model database.
使用MDX进行查询的先决条件是具有已安装的SSAS Tabular实例和已部署的SSAS Tabular模型数据库SQL Server Management Studio 2014或更高版本。
环境准备 (Environment preparation)
Querying a SSAS Tabular model database with MDX takes place in SQL Server Management Studio, in the MDX query window.
使用MDX查询SSAS表格模型数据库是在SQL Server Management Studio的MDX查询窗口中进行的。
多维表达式(MDX)概述 (Multidimensional Expressions (MDX) overview)
MDX is expression language which can query and analyze multidimensional data in OLAP cubes (like SSAS Multidimensional model databases, e.g.). Although it is primarily designed for querying a Multidimensional model database, it can query a Tabular model database, too. In the other hand, DAX functions cannot query Multidimensional model databases, because DAX query expressions are specific to Tabular model databases.
MDX是一种表达语言,可以查询和分析OLAP多维数据集中的多维数据 (例如SSAS多维模型数据库)。 尽管它主要用于查询多维模型数据库,但它也可以查询表格模型数据库。 另一方面,DAX函数无法查询多维模型数据库,因为DAX查询表达式特定于表格模型数据库。
Structurally, MDX incorporates XMLA specified syntax. Since it is similar to T-SQL, some DDL statements are present, which can manage and organize multidimensional data constructions. This applies to SSAS Multidimensional model databases only.
在结构上,MDX合并了XMLA指定的语法。 由于它类似于T-SQL,因此存在一些DDL语句 ,这些语句可以管理和组织多维数据构造。 这仅适用于SSAS多维模型数据库。
Regarding complexity, the main types of MDX expressions are: constant (numeric, string etc.), scalar and object-oriented. These types combine into complex expressions corresponding with statements and