Inside a report dataset, I'm having an MDX query which has the following line in it:
SELECT STRTOSET ( ' { @LocationParam } ' ) ON COLUMNS
with a parameter named @LocationParam which expression is ="[Location].[Name].&[Location1]"
When replacing the @LocationParam inside the MDX by pasting [Location].[Name].&[Location1] (SELECT STRTOSET ( ' { [Location].[Name].&[Location1] } ' ) ON COLUMNS) and running the whole MDX (unchanged for the remaining) inside SSAS or inside SSRS, it runs without issue.
But inside SSRS, using the parameter @LocationParam, once run, I get the following error and I don't know why:
"The @LocationParam parameter could not be resolved because it was referenced in an inner subexpression"
Using the profiler with the event "Query Begin", I can notice the parameter "@LocationParam" is correct
<Parameter>
<Name>LocationParam</Name>
<Value xsi:type="xsd:string">[Location].[Name].&[Location1]</Value>
</Parameter>
Thank you