Track your progress and stay up-to-date

By clicking Track progress, you are giving your consent to Microsoft to provide you updates about Power BI learning resources via email. You can unsubscribe at any time.

×

Great! You finished your first topic!

Enter your email to track your progress and stay up-to-date on new Power BI learning content.

By clicking Track progress, you are giving your consent to Microsoft to provide you updates about Power BI learning resources via email. You can unsubscribe at any time.

×

Thanks!

As you progress through Guided Learning, a green checkmark will appear next to your completed topics.

×

You’ve mastered the building blocks

With an introduction complete, get ready to dive deep!

在 DAX 表达式中使用变量

下一主题

表关系和 DAX

继续

再次观看

使用变量是 DAX 表达式的功能非常强大的组成部分。

你可以使用以下语法在 DAX 表达式的任意位置定义一个变量:

VARNAME = RETURNEDVALUE

变量可以是任何数据类型,包括整个表。

请记住,每次在 DAX 表达式中引用变量时,Power BI 必须根据定义重新计算它的值。 因此,在函数中避免使用重复变量是一个好做法。

视频内容由 Alberto Ferrari, SQLBI 提供

Request demo