我發展產生MDX查詢生成器應用程序並嘗試使用以下,這只是罰款從立方體得到客戶數:如何確定尺寸是否相關?
WITH MEMBER MEASURES.X AS (
{ [Customer].[Gender].[Female]},
[Customer].[Customer].Children
).Count
SELECT Measures.X ON 0 FROM [Adventure Works]
但是,如果用戶在一個維度是不相關的拖累給客戶如:
WITH MEMBER MEASURES.X AS (
{ [Customer].[Gender].[Female]},
{ [Employee].[Status].[Active], [Employee].[Status].[Inactive]},
[Customer].[Customer].Children
).Count
SELECT Measures.X ON 0 FROM [Adventure Works]
計數結果明顯變得不正確。
有沒有方法可以確定維度是否與客戶相關,以便我可以從生成的MDX查詢中排除它?