I have an MDX query that retrieves data from an SSAS 2005 cube:
SELECT NON EMPTY { [Measures].[Record Count] } ON COLUMNS
FROM [Cube]
WHERE { [Dimension].[Date].[Day].&[2012]&[1]&[1]:[Dimension].[Date].[Day].&[2012]&[1]&[10] }
This normally works well. However, when there are no records on 2012-01-01, it appears that a NULL value is substituted in and the query ignores that date range start parameter.
How can I check to see whether that dimension member exists and use another date (2012-01-02) in that range clause if it doesn't exist?