picmate 涅
picmate 涅

Reputation: 4249

MDX Beginning to Current Date Sum

This is regarding calculating the sum for a set of values starting from the date a measure has entries till the current date.

So far what I could find was the YTD function. This limits the aggregation capability till the current date beginning from the first day of the year. But what my requirement is to start the calculation from the first value, this could be in the last year or may be two years before.

Eg:

Date-----------Value

11/9/2010-----2000

2/10/2011-----500

8/5/2011------1000

With YTD the value is: 1500

What I need is: 3500

I really appreciate any help on this.

Upvotes: 0

Views: 2314

Answers (1)

Max
Max

Reputation: 804

Something like:

SUM([Date].[Day].AllMembers, [Measures].[Value])

OR

SUM(OpeningPeriod([Date].[Day]):ClosingPeriod([Date].[Day]), [Measures].[Value]),

where [Date].[Day] - it's a level DAY of your dimension; [Measures].[Value] - your measure.

Upvotes: 1

Related Questions