I don't usually get involved with MDX if I dont have to, but....
I have a cube with simple fact table linked to a time dimension (with date,month,year columns and so on) and I want to be able for a given day of the month calculate the month to date total for that day.
In SQL it would be a doddle, however I'm not sure of how to achieve this in MDX.
Update I have an example working for a fixed date. Now I want to know how to do this for any possible date
WITH
MEMBER MTD_15_Feb_2010 AS
Aggregate
(
MTD([Date].[Year Name - Quarter Name - Month Name - Name].[Name].[02/15/2010]),
[Measures].[Value]
)
SELECT
{
MTD_15_Feb_2010
} ON 0
FROM [Cube]