首页 > 解决方案 > MDX:过滤器函数中的集合表达式是什么?

问题描述

我正在使用AdventureWorksDW2008R2并且我正在尝试创建一个calculated member只考虑[FactInternetSales]where 中的行[SalesAmount] > 300

Calculations我尝试了类似下面的东西,但我收到了错误MdxScript(Adventure Works DW2008R2) (8, 5) Too few arguments were passed to the FILTER function. The minimum argument count for the function is 2.

filter(([措施].[销售额]>300))

我知道我缺少参数set expression。在我的示例中,此参数将是哪个?我是SSAS和的新手MDX

我正在创建这个计算成员,以便我在 Excel 中看到的总计只考虑 Fact 表中 [Sales Amount] > 300 的行。

我还包括屏幕截图,也许它有帮助: 在此处输入图像描述

标签: excelvisual-studio-2013ssassql-server-data-toolsbusiness-intelligence

解决方案


你必须像这样使用它

filter([FactInternetSales],([FactInternetSales].[SalesAmount]>300))

filter需要两个参数,第一个是表名,第二个是需要在该表上应用的过滤器


推荐阅读