0
votes

I am receiving following error while I am trying to edit SSRS Parameter using Query window.

Query Preparation Failed

An MDX expression was expected. An empty expression was specified. (Microsoft SQL Server 2012 Analysis Services)

My MDX query is as follows.

WITH 
MEMBER [Measures].[ParameterCaption] AS [Product].[Category].CURRENTMEMBER.MEMBER_CAPTION 

MEMBER [Measures].[ParameterValue] AS [Product].[Category].CURRENTMEMBER.UNIQUENAME 

MEMBER [Measures].[ParameterLevel] AS [Product].[Category].CURRENTMEMBER.LEVEL.ORDINAL 

SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , 
        [Product].[Category].ALLMEMBERS ON ROWS 

FROM ( SELECT ( STRTOMEMBER(@FromDateDate, CONSTRAINED) : STRTOMEMBER(@ToDateDate, CONSTRAINED) ) ON COLUMNS FROM [Adventure Works])

Thanks.

1

1 Answers

0
votes

The syntax looks fine to me so I am guessing there is some problems with your parameters, @FromDateDate and @ToDateDate. Have you given them a valid default value? Have you tried to remove the CONSTRAINED flag and see if that makes any difference?