Using column visibility when Multiple Values is ticked

  • Hi,

    How can I use column Visibilty when I have mutilple values selected in my parameter.

    With normal visibility I use:

    =IIF(Parameters!xxxxx.value = "xxxx", true, false)

    I need the multi option available so my team can select the various options. The parameter this is on is text.

    Is there a way I can do this.

    Thank you

  • Hi,

    There sure is. Multivalue parameters are arrays so the best way to do this is with IndexOf. e.g.

    =Array.IndexOf(Parameters!Param1.Value, "myvalue") > -1

    Array.IndexOf takes an array (your parameter) as the first argument and the value you want to look up as the second argument.

    It will return a 0-based index of the value if it exists in the array and -1 if it doesn't, which is why you use > -1 as the condition.

    HTH

    (also to save you from RSI, Parameters!xxxxx.value = "xxxx" would return true or false anyway, so you don't need the IIF)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply