Hi all,I would like to implement a running total of a measure over Days, Weeks, Months, ... in an MDX query and ultimately as a Calculation in my Cube.I know that there are a lot of articles out there and I have found a few solutions but none of which works within the context of a specific Date Rage.Setting:Time Dimension [DimTime].[Date].[Date] and [DimTime].[Week].[Week]Measure to aggregate: Measure.HitsIf I run the following query:[i]WITH MEMBER Measures.toto AS Aggregate({[DimTime].[Date].[Date].Members.Item(0):[DimTime].[Date].currentmember}, [Measures].[Hits]))SELECT {Measures.[Hits], Measures.toto} ON 0, NON EMPTY [DimTime].[Date].[Date] ON 1FROM [My Cube][/i]It works fine however if I had a specific Date Range in the "[i]WHERE[/i]" Clause or directly in the "[i]SELECT[/i]", it aggregates values outside the Date Range.To simplify, I would like the aggregation to start at the first Date in the Query and not before.I have played with Aggregate, Sum, ... and no joy. :-(I'm sure some of you will point out what I have stupidly missed.Cheers
↧