excel - 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 的行。
解决方案
你必须像这样使用它
filter([FactInternetSales],([FactInternetSales].[SalesAmount]>300))
filter需要两个参数,第一个是表名,第二个是需要在该表上应用的过滤器
推荐阅读
- php - 我可以在 Wordpress 的代码片段插件中使用 jQuery Ajax 请求吗?
- mysql - MySQL 工作台需要很长时间才能响应(启动/关闭服务器)?
- z3 - 模数约束传播
- c# - 我可以在 WaitForSeconds() 中使用可为空的浮点数(浮点数?)吗?
- 7zip - 如何提取具有相对路径的 7zip 档案
- angular - 使用库在 Angular 中对 URL 查询参数(查询值作为某个 URL)进行编码
- python - 从文件夹中读取所有图像和相应的蒙版并在原始图像上绘制计数并保存在python的文件夹中
- java - 默认位置如何工作?/ 什么是默认监视器?
- java - 白色填充/边框
- django - 在 Django 模板中获取查询集中的值