power BI度量值計算,大於30的為計數
时间: 2023-08-19 15:15:29 浏览: 359
您可以使用“计数”函数来计算大于30的度量值的数量。以下是一些步骤:
1. 在Power BI Desktop中,选择要计算的度量值,并右键单击它。
2. 选择“新建度量值”。
3. 在公式栏中输入以下公式:COUNTX(FILTER('表格名', '度量值'>30), '度量值')
4. 将“表格名”替换为包含度量值的表格名称。
5. 将“度量值”替换为要计算的度量值的列名称。
6. 点击“确定”以创建新的度量值。
现在,这个度量值将计算大于30的度量值的数量。您可以在报表中使用它来可视化这个数据。
相关问题
度量值 = CALCULATE(DISTINCTCOUNT('最终拆分'[ACCOUNT]),FILTER('最终拆分','最终拆分'[工单状态] is '已关怀')这个powerbi度量值哪里错了
这个 PowerBI 度量值语法存在两个问题:
1. 在 FILTER 函数中,'最终拆分'[工单状态] is '已关怀' 语法是不正确的。正确的语法应该是 '最终拆分'[工单状态] = "已关怀"。
2. DISTINCTCOUNT 函数需要至少一个参数,来指定需要计算唯一计数的列。在这个例子中,应该使用 '最终拆分'[ACCOUNT] 作为参数。
因此,可以修改为以下语法:
```
度量值 = CALCULATE(
DISTINCTCOUNT('最终拆分'[ACCOUNT]),
FILTER('最终拆分', '最终拆分'[工单状态] = "已关怀")
)
```
阅读全文
相关推荐
















