2013-06-26 164 views
1

任何人都可以解釋爲什麼這一個失敗:簡單MDX篩選查詢

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

,而這一次是罰款?

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

第一個給出了一個errror

「函數需要對自變量的字符串或數值表達式。使用甲連音設置表達」。

他們看起來和我完全一樣。

回答

1

意識到,這應該是

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

幹得好!選擇答案作爲接受答案來解決問題。 – Stoleg