I am facing difficulty in passing parameters to MDX Query below.I want to add below conditions to the query pasted below and should be able to pass the values run time.
Where [Measures].[Forecast_Unit] > ? and [Measures].[Gross_Margin_Percent] < ?
MDX Query without paramters
WHERE [Measures].Forecast_Unit > Parameter("forecastUnits",double)
AND [Measures].Gross_Margin_Percent < Parameter("grossMargin",double)
I suspect you must have solved this problem already as this thread is old.
For passing parameter, function parameter is right. I think, you must facing issue in executing MDX with where condition. right?
for this kind of condition I would use filter functionality of MDX.
filter(<your cross join>,[Measures].[name] > parameter(<parameter Name>,<type>)
SELECT [Measures].[Internet Sales Amount] ON 0,
, [Measures].[Internet Sales Amount]>10000)
Note: Have seen slow behavior sometime while using filter
Edited by: Sumant on Feb 6, 2012 1:46 AM