MDX Current Month Problem
- by schone
Hi all,
I have the following MDX query:
WITH
MEMBER [Measures].[TY Sales]
AS 'SUM([Measures].[Sales])'
MEMBER [Measures].[YTD Sales]
AS 'SUM(PERIODSTODATE([Time.Fiscals].[2009], [Time.Fiscals].CurrentMember), [Measures].[Sales])'
MEMBER [Measures].[LY Sales]
AS 'SUM(PARALLELPERIOD([Time.Fiscals].[2009].[8], 1, [Time.Fiscals].CurrentMember),[Measures].[Sales])'
MEMBER [Measures].[LYTD Sales]
AS 'SUM(PERIODSTODATE([Time.Fiscals].[2009], PARALLELPERIOD([Time.Fiscals].[2009].[8], 1, [Time.Fiscals].CurrentMember)), [Measures].[Sales])'
SELECT
{[Measures].[TY Sales],[Measures].[YTD Sales],[Measures].[LY Sales],[Measures].[LYTD Sales]} ON COLUMNS,
[Time.Fiscals].[2009].[8] ON ROWS
FROM
[Sales]
The above query displays sales for fiscal year 2009 and fiscal month 8 (Feb), I would like the fiscal year and fiscal month dynamic but I'm unsure on how to do this?
I'm using Mondrian.
Thanks!