SELECT
{
Measures.[Deviation]
,[Measures].[Product ID]
} ON COLUMNS
,Filter
(
CrossJoin
(
{[Dim Customer].[Customer Name].[Customer Name].MEMBERS}
,{[Dim Customer].[Gender].[Gender].MEMBERS}
,{[Dim Customer].[Customer ID].[Customer ID].MEMBERS}
)
,
[Measures].[Product ID] > 1 AND [Measures].[Deviation] > 5
AND
[Measures].[Quantity] > 1
) ON ROWS
FROM
(
SELECT
[Dim Customer].[Customer ID].&[1] : [Dim Customer].[Customer ID].&[5] ON COLUMNS
FROM
(
SELECT
{
Instr
(
[Dim Customer].[Customer Name].CurrentMember.Properties('Member_Caption')
,'H'
)
= 1
} ON COLUMNS
FROM [OLAP Cubes]
)
);
当我运行以上查询时,我收到错误:
该函数需要1参数的元组集表达式。一个 使用了字符串或数字表达式。
如何解决此错误?
答案 0 :(得分:0)
这部分是问题......
...
SELECT
{
Instr
(
[Dim Customer].[Customer Name].CurrentMember.Properties('Member_Caption')
,'H'
)
= 1
} ON COLUMNS
...
您只能在COLUMNS或ROWS上使用已识别的数据类型...我指的是一个成员,一组成员或一组元组。
您是否真的尝试FILTER
?
...
SELECT
Filter(
[Dim Customer].[Customer Name].[Customer Name].MEMBERS,
Instr
(
[Dim Customer].[Customer Name].CurrentMember.Properties('Member_Caption')
,'H'
)
= 1
) ON COLUMNS
...