I am creating a parameter list in SSRS using MDX, and so I just want to list the completed quarters. The way it works is we have "records" that get submitted on certain dates. If the last date that it gets submitted is not equal to the quarter end date then restrict the parameter list to be up to the last quarter.
So The last submission was on Oct which is Quarter 3, but since October is not the end of the quarter, we want it to show the list upto quarter 2. Here is my MDX for the drop down list
WITH
MEMBER [Measures].[ParameterCaption] AS
[Date - Submitted].[Submitted Year-Quarter].CurrentMember.Member_Caption
MEMBER [Measures].[ParameterValue] AS
[Date - Discharge].[Submitted Year-Quarter].CurrentMember.UniqueName
MEMBER [Measures].[ParameterLevel] AS
[Date - Submitted].[Submitted Year-Quarter].CurrentMember.Level.Ordinal
SELECT
{
[Measures].[ParameterCaption]
,[Measures].[ParameterValue]
,[Measures].[ParameterLevel]
} ON COLUMNS
,NonEmpty
(
[Date - Submitted].[Submitted Year-Quarter].Children
,[Measures].[Records Count]
) ON ROWS
FROM [Records Cube]
WHERE
[Records].[Submission Status].&[Submitted];
any ideas on what I can add to this so that it can check whether it is the end of the quarter, and if not, just included [Submitted Year-Quarter of the one before this