我已經寫了下面的MDX查詢這裏我在做什麼嘗試獲得基於在IIF功能應用多個條件湯姆的結果:SUM和多個IIF功能狀況MDX
WITH
SET [kpi_study] AS
{[study].[study].[BHC June12]}
SET [geographic] AS
{[territory.market_hierarchy].[state].[MP]}
SET [brand] AS
{[brand.brand_hierarchy].[brand].[Gold Flake (Unspecified)]}
SET [edu12] AS
IIF
(
'All' = 'All'
,[education].[education].MEMBERS
,[education].[education].[All]
)
SET [town] as
IIF(
'All' = 'All'
,[territory.market_hierarchy].[town_class].MEMBERS
,[territory.market_hierarchy].[town_class].[All]
)
SET [occp] as
IIF(
'All' = 'All'
,[occupation].[occupation].MEMBERS
,[occupation].[occupation].[All]
)
MEMBER [Measures].[t] AS
SUM(([edu12],[town],[occp]),[Measures].[tom])
SELECT
NON EMPTY
{[Measures].[t]} ON COLUMNS
FROM [funnel_analysis]
WHERE
{[kpi_study]*[geographic]*[brand]}
但收到的一些錯誤。對於單一的iif功能,它的工作正常,即:**(SUM([edu12],[Measures].[tom]))**
無法找出我在哪裏做錯了多個。
什麼是錯誤?代碼看起來不錯。 – SouravA
@SouravA:執行查詢時出錯。請檢查服務器日誌或聯繫您的管理員!無法找到我在做錯的地方..你可以幫我 – sam140
@meff:請告訴我任何想法我們如何解決這個問題 – sam140