将多维数据集度量与不同的where子句一起添加

时间:2013-01-11 11:52:08

标签: mdx olap cube

我有两个MDX查询,

select [Measures].[Goals A] on 0 from [FDC Star] where [Squad A].[Squad Key]

并且

select [Measures].[Goals B] on 0 from [FDC Star] where [Squad B].[Squad Key]

我想将这两个值加在一起但对MDX来说是新手我不知道。

1 个答案:

答案 0 :(得分:1)

您可以使用计算成员:

WITH
   MEMBER [Measures].[A] AS ([Measures].[Goals A], [Squad A].[Squad Key])
   MEMBER [Measures].[B] AS ([Measures].[Goals B], [Squad B].[Squad Key])
SELECT {[Measures].[A], [Measures].[B]} ON 0
FROM [FDC Star]