Excel Dax 简明教程

Excel DAX - Syntax

正如前面所讨论的,DAX 是一种由运算符、值、函数和公式组成的公式语言。在本章中,您将了解 DAX 语法。

As discussed earlier, DAX is a formula language comprising of operators, values, functions, and formulas. In this chapter, you will learn about DAX Syntax.

DAX Syntax 可以分类为 -

DAX Syntax can be categorized as −

在您继续学习 DAX 语法之前,您必须了解 Excel 公式和 DAX 公式之间的区别。

Before you proceed to learning DAX Syntax, you have to understand the difference between Excel formulas and DAX formulas.

Differences between Excel Formulas and DAX Formulas

DAX 公式与 Excel 公式类似,您可以它们输入到公式栏中。但是,两者之间存在一些重要的区别。

DAX formulas are similar to the Excel formulas and you can type them in the formula bar. However, there are some vital differences between the two.

Excel Formula

DAX Formula

Excel formulas are typed in the formula bar in the Excel window.

DAX formulas are typed in the formula bar in the Power Pivot window.

In Excel formulas, you can reference individual cells or arrays for data.

In DAX formulas, you can reference only complete tables or columns of data, i.e. references can be only to tables and fields in the tables. However, if at all you have to perform a calculation only on a part of the column data, you can do so with the DAX functions that filter and provide the required unique data values for calculation.

Excel formulas support certain data types.

DAX provides more data types than Excel does. Hence, DAX formulas can use the additional data types also.

Excel does not support any implicit data conversions.

DAX performs implicit data type conversions during calculations.