Multi-Select for Parameters Not Working

Hello, I have a parameter set up on a dashboard that seems to be working exactly how I would like it to but once I turn on multi-select for this parameter it doesn’t seem to work with the visualizations it is targeting. Do you know what could be going on here, this is my equation and I have this column filtered on only true values.

[Stock Parameter] = [Stock]

Hey Zachary!

Great question, if you would like to use Multi-Select for parameter then you will have to use the “Contains()” function which will capture all the values selected from your dashboard. This formula should work for you:

Contains([Stock Parameter], [Stock])

It is also important to change your parameter settings so that it sends Comma Separated Values back into your worksheet.

The above formula works well, but if the parameter is blank, it will show no data.
Let’s add some code, that will show all of my data, when the parameter is blank.

IF my parameter is blank
THEN set this calculation to TRUE
ELSEIF my parameter matches the data field, then set this calculation to TRUE
ELSE set this calculation to FALSE`

Here is the actual Sigma code:
If(COALESCE(Trim([Stock Parameter]),“”) =“”, true ,Contains([Stock Parameter] , [Stock] ) )

So this is pretty good, and the formula above works well, but it will produce exact and also partial matches. For example, let’s say that you have these 3 stock symbols:

AP        AA        AAPL

When you type AP into the parameter, this filter will show rows that have both AP and AAPL (because AAPL has a AP in the middle).

If you want a precise match, so that, when you type AP, it will find all rows with AP, while ignoring rows with AAPL, APP etc…, here is a more complex formula:

If(COALESCE(Trim([Stock Parameter]),“”) =“”, true ,Contains(“,” & [Stock Parameter] & “,” , “,” & [Stock] & “,”) )

Please remember, that in order to make any of these formulas to work, you need create a filter off of them, then set that filter to only include true values.

1 Like