我有这个简单的MDX查询,它会带回客户层次结构维度(客户描述,客户业务,客户ID)下的所有元素。查询执行正常,但我需要排除返回#null的行。我尝试过使用Non Empty但它无效。
WITH
MEMBER [Measures].[Label] AS [Customer Hierarchy].CURRENTMEMBER
MEMBER [Measures].[UniqueName] AS [Customer Hierarchy].[Customer ID].CURRENTMEMBER.UNIQUENAME
SELECT
NON EMPTY {
[Measures].[Label],
[Measures].[UniqueName]
} ON COLUMNS
, NON EMPTY {[Customer Hierarchy].[Customer ID].ALLMEMBERS } ON ROWS
FROM [SUMMARY]
查询结果(客户,客户描述,客户ID)
答案 0 :(得分:0)
尝试帮助诊断正在发生的事情 - 如果你运行它会得到什么:
WITH
MEMBER [Measures].[Label] AS
[Customer Hierarchy].CurrentMember
MEMBER [Measures].[Label2] AS
[Customer Hierarchy].CurrentMember.Member_Caption
MEMBER [Measures].[UniqueName] AS
[Customer Hierarchy].[Customer ID].CurrentMember.UniqueName
SELECT
NON EMPTY
{
[Measures].[Label2]
} ON COLUMNS
,NON EMPTY
{[Customer Hierarchy].[Customer ID].ALLMEMBERS} ON ROWS
FROM [SUMMARY];