我想添加一个与同一个SELECT mdx语句具有不同维度的度量。通常,我的大部分措施都与[客户创建日期]。[日期层次结构]。[月份名称]相关联。 但是,匿名客户没有指向客户创建日期的链接;因此,我必须将匿名链接与查询创建日期相关联。如何将两个度量组合成单个选择查询。
> WITH MEMBER [Measures].[Allow Contact] as
([Measures].[# CRM Customers],[Customer].[Customer Allow Contact].&[Yes],[Customer].[Customer Status].&[Active] )
MEMBER [Measures].[Total Identified Customers] AS
([Measures].[# CRM Customers],[Customer].[Customer Status].&[Active] )
MEMBER [Measures].[Anonymous Customers] AS
([Measures].[# Unique Distinct Customers on Contact],[Enquiry].[Anonymous].&[Yes])
SELECT NON EMPTY { Measures].[Allow Contact],
[Measures].[Total Identified Customers]
//,[Measures].[Anonymous Customers]
} ON COLUMNS
,NON EMPTY ([Customer Creation Date].[Date Hierarchy].[Month Name]
//,[Enquiry Creation Date].[Date Hierarchy].[Month Name] //How to add different dimensionality
) ON ROWS
FROM [Cube]
答案 0 :(得分:1)
如果两个时间维度具有相同的结构(如果它们在同一维度对象上实现为角色扮演维度,则显然应该如此),您可以在{{1}的定义中使用LinkMember
function }在行中使用[Measures].[Anonymous Customers]
,但在度量计算中将这些日期用作[Customer Creation Date].[Date Hierarchy]
:
[Enquiry Creation Date].[Date Hierarchy]