我正在尝试合并两个单独的MDX查询的结果,其中度量来自同一度量值组。多维数据集设计基于生命周期事务模型,其中日期是所有角色扮演维度。查询是:
select [Measures].[Issued] on columns,
[Product].[Product Name].[Product Name] on rows
from [MET2DW]
where ([Product].[Product Type].&[IP], [Product].[Component Type].&[SD],[Issued Date].[Fiscal Year Name].&[Fiscal Calendar 2010])
select [Measures].[Last hits] on columns,
[Product].[Product Name].[Product Name] on rows
from [MET2DW]
where ([Product].[Product Type].&[IP], [Product].[Component Type].&[SD],[Last Sync Date].[Fiscal Year Name].&[Fiscal Calendar 2010])
我尝试过使用CROSSJOIN,但后来抱怨我试图交叉加入的措施是在同一个层面。如果我在同一组上运行两个度量的查询,那么日期过滤器就不再有用了。问题基本上是每个计数都有不同的日期维度,并且它们分为不同的方式......
有没有办法做到这一点?
答案 0 :(得分:2)
您可以为两个不同维度的元组(也称为相同的层次结构)创建MDX calculated member同时添加值:
with
member [Measures].[-Issued] as ([Issued Date].[Fiscal Year Name].&[Fiscal Calendar 2010],[Measures].[Issued])
member [Measures].[-Last hits] as ([Last Sync Date].[Fiscal Year Name].&[Fiscal Calendar 2010],[Measures].[Last hits])
select
{[Measures].[-Issued],[Measures].[-Last hits]} on columns,
[Product].[Product Name].[Product Name] on rows
from
[MET2DW]
where
([Product].[Product Type].&[IP], [Product].[Component Type].&[SD])