# 计算组

如果有开发基础的朋友 ，理解计算组的时候就会更容易些，计算组就像其他编程语言中的方法，因为有些语句会重复使用，便提出来，定义为一个方法，比如下面这段代码就是一个最简单的方法，而计算组也可理解为一个方法，只不过计算组的参数是度量值，并且使用计算组不止是为了通用，也有可能是为了特殊处理。

```
def add(a, b ):
    return a+b
```

了解计算组也可阅读官方文档

<https://learn.microsoft.com/zh-cn/training/modules/dax-power-bi-calculation-groups/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.powerbi.fun/ji-suan-zu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
