我在执行MDX查询时收到如下所示的错误。
我正在使用HAVING
过滤掉[Accessories]
English Product Category Name
SELECT
{
(
[Ship Date].[Hierarchy].[Calendar Year].&[2001]
:
[Ship Date].[Hierarchy].[Calendar Year].&[2004]
)
-
[Ship Date].[Hierarchy].[Calendar Year].&[2003]
} ON 0
,{
[Dim Product Category].[English Product Category Name].[English Product Category Name]
} HAVING
[Dim Product Category].[English Product Category Name].MEMBERS
<>
[Dim Product Category].[English Product Category Name].&[Accessories] ON 1
FROM [CubeForMDXReports];
**执行查询...
Query(10,1)NotEqualTo函数需要1参数的字符串或数字表达式。使用元组集表达式。 执行完成**
答案 0 :(得分:0)
您正尝试在HAVING
子句中执行此操作:
[Set] <> [Member]
因此例外。
你可以使用Except忽略配件:
SELECT
{
(
[Ship Date].[Hierarchy].[Calendar Year].&[2001]
:
[Ship Date].[Hierarchy].[Calendar Year].&[2004]
)
-
[Ship Date].[Hierarchy].[Calendar Year].&[2003]
} ON 0
,Descendants
(
Except
(
[Dim Product Category].[English Product Category Name].MEMBERS
,[Dim Product Category].[English Product Category Name].&[Accessories]
)
,[Dim Product Category].[English Product Category Name].[English Product Category Name]
) ON 1
FROM [CubeForMDXReports];