当前位置: 动力学知识库 > 问答 > 编程问答 >

mdx - Adding together cube measures with different where clauses

问题描述:

I Have two MDX queries,

select

[Measures].[Goals A] on 0

from [FDC Star]

where [Squad A].[Squad Key]

And

select

[Measures].[Goals B] on 0

from [FDC Star]

where [Squad B].[Squad Key]

I would like to add the two values together but being very new to MDX I have no idea.

网友答案:

You can use calculated members:

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]
分享给朋友:
您可能感兴趣的文章:
随机阅读: