• StrToValue ( @SelectionGeographie + ".Hierarchy.Currentmember.Uniquename" )

    StrToValue( @SelectionActivite + ".Hierarchy.Currentmember.Uniquename" )

    StrToValue( @Annee + ".Hierarchy.Currentmember.Uniquename" )

    StrToValue( @Perimetre + ".Hierarchy.Currentmember.Uniquename" )

    STRTOSET ( "{" + @SelectionGeographie + "}")

    STRTOSET ("{" + @SelectionActivite + "}" )

    STRTOTUPLE ( "(" +@Annee + "," + @Perimetre + ")" )

    Parameters in reporting services cannot be arrays, although you can get away with SQL parameters like this "where field in (@parameter)", check the query actually being passed in profiler and you'll see it's SSRS intervening though, it's not passing an array. SQL and MDX can't do arrays either so you need to work around that by providing a long string.

    With these MDX functions, they are all expecting string input in order to produce a value / set / tuple. If you wanted to do multi value you would need to use a different one for each value of the parameter, or alternatively create them dynamically.

    One option is to use the Expression builder for the query. I.e. right click on your dataset, choose properties, click the Fx button to edit the query as an expression.

    Make the entire query a string that evaluates to an MDX query.

    e.g.

    ="With member...

    select on 0

    , on 1

    from cube"

    You can use the SSRS JOIN() function[/url] to link all your parameters into one long comma delimited string and then intersperse those into the MDX string. You will end up with a lot of nested quotes though so it will get really tricky to read and debug.

    You would want something like this (you can't refer to @Parameter in an SSRS expression, you need to use Parameters!Parameter.value)

    STRTOSET ( "{" + JOIN(Parameters!SelectionGeographie.value,",") + "}")

    For the other example, you will want to include the hierarchy in each instance of the parameter value

    e.g. this won't work because you need the hierarchy in every instance and the formula will exlude it from the final one:

    StrToValue ( Join(Parameters!SelectionGeographievalue + ".Hierarchy.Currentmember.Uniquename,") )

    Stacia Misner also has a good write up on a similar technique here [/url]

    Another option is to move your MDX query into a stored procedure, and pass in the multi-value parameter into it.