user1969857
user1969857

Reputation: 3

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.

Upvotes: 0

Views: 202

Answers (1)

Benoit
Benoit

Reputation: 1993

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]

Upvotes: 1

Related Questions