top of page

How to Create a Multi-Select Parameter in Sigma

Creating multi-select parameters was one of the first use cases I thought of when Sigma released custom function-driven actions. You might be thinking, "Wait, doesn't Sigma have this built-in?" And yes, they do. For example, you can set a List Control Element to multi-select and reference it like a parameter. This guide will demonstrate how to recreate or mimic that functionality with actions. The benefits to this option are 1) you can create custom UIs and buttons instead of the built-in options, and 2) you can filter on multiple columns vs a single.




Step 1: (Optional) Group data to the filter button level


This step is completely optional because the calculations we'll use can be applied at the raw data or an aggregated level. I will use the grouped version to make the screenshots and steps simpler.


For this example, I want to create buttons for Product Type and will build a bar chart of sales by month so I've grouped to Month and Product Type.


Step 1: Group Data
Step 1: Group Data

Step 2: (Optional) Create a Length Calculation


This step is also optional if your filter values are unique. In this example, the Product Type has "Entertainment" and "Arts & Entertainment" as two different types. We're going to use Contains() functions, so we will make them unique by concatenating the length of the product type name to the product type name.


Step 2: Create a Length Calculation
Step 2: Create a Length Calculation

Step 3: Create a blank Parameter


The first required step is to create a blank text control type element. I've renamed mine to "Product-Type-Param," but you can use anything that makes sense for your workbook.



Step 3: Create a blank parameter
Step 3: Create a blank parameter

Step 4: Create one button per item


Next, add one button for each item you'd like an end user to be able to select. For these instructions, I'll use the Sigma Button UI Element, but you could use images.


Step 4: Create Buttons
Step 4: Create Buttons

Step 5: Add an Action to each button


Now that we have buttons, we need to connect actions to each one to act as selecting and unselecting an item. Since Sigma doesn't have a way to source a formula action's value from an individual column value, we need to tell Sigma what values each button represents manually.


Below is the formula to use for each button; be sure to update the button value to be unique.


Set Control Value Custom Formula:

If(Contains([Product-Type-Param], "Arts & Entertainment20,"), Replace([Product-Type-Param], "Arts & Entertainment20,", ""), Concat([Product-Type-Param], "Arts & Entertainment20,"))

Here's a more generic version of the Set Control Value Custom Formula:

If(Contains([Your-Multi-Select-Param], "Value you want to add,"), Replace([Your-Multi-Select-Param], "Value you want to add,", ""), Concat([Your-Multi-Select-Param], "Value you want to add,"))

How does this formula work?


Step 5: Add an action to the button
Step 5: Add an action to each button

Step 6: Create a filter


Lastly, we need to filter our data based on what items are in the parameter.


Filter Calculation (Concat portion is optional based on step 2)

Contains([Product-Type-Param], Concat([Product Type], Text(Len([Product Type]))))

Step 6: Filter to Items selected in Parameter
Step 6: Filter to Items selected in Parameter

Step 7: (Optional) Add an Indicator


An indicator can help identify whether an item is currently selected. Here's a simple calculation for adding a dynamic text element next to each button.


If(Contains([Product-Type-Param], "Arts & Entertainment20,"), "✅", "❌")

Step 7: Add an indicator
Step 7: Add an indicator

Conclusion


By following these steps, you can build a custom multi-select parameter interface in Sigma, offering more flexibility and control than the built-in options. This method lets you create personalized UIs and filter across multiple columns, enhancing your dashboards' interactivity and functionality.


This approach is just one of many ways to use formula-based actions in Sigma. With these tools, you can explore a wide range of possibilities to create dynamic and interactive dashboards tailored to your specific needs.



bottom of page