0
votes

I have output from a MDX query that looks like this:

Duration Month A B

1 13-Jan $ 436940 $2377

1 13-Feb 420652 1590

1 13-Mar 412365 2265

2 13-Jan 432589 2374

2 13-Feb 362598 1136

2 13-Mar 263598 3965

etc, for 5 Durations, 12 months each duration. A and B are derived from Members I need to be able to have a C column that is the sum of A for Duration 1 Jan 13 & Duration 1 Feb 13. Then the sum of A for Duration 1 Feb 13 and Duration 1 March 13, and so on. I do not know how to do this in MDX and could only find posts addressing how to do a running total, or total a row instead of a column, etc.

Any help would be greatly appreciated.

1

1 Answers

0
votes

Member [Date].[2 Months Sales] as

( ([Date].[Calendar].[Month].currentMember ,[sales].[sales]) + ([Date].[Calendar].[Month].NextMember ,[sales].[sales]) )

select [Sales].[sales] on rows,

[Date].[2 Months Sales] on Columns from [Cube]