简体   繁体   中英

Simple MDX Filter Query

Can anyone explain why this one fails :

WITH MEMBER [Measures].[T]
as
    Filter(
                [Customer].[Customer Name].Children,
                [Measures].[Sales] > 65042.79
        )
SELECT 
  [Measures].[T] on 0
FROM [SalesCube]

while this one is fine?

SELECT 
    Filter(
            [Customer].[Customer Name].Children,
            [Measures].[Sales] > 65042.79
        ) on 0
FROM [SalesCube]

The first one gives an errror

"The function expects a string or numeric expression for the argument. A tuplet set expression was used."

They look exactly the same to me.

Realised that it should have been

WITH SET [T]
as
    Filter(
                [Customer].[Customer Name].Children,
                [Measures].[Sales] > 65042.79
        )
SELECT 
  [Measures].[T] on 0
FROM [SalesCube]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM