> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Create and configure a segmented control

A segmented control has between one and seven sections that a user can select to filter data in target elements. The segments in the control are single-select, so each segment acts like a radio button, selecting the matches and excluding other data.

You might choose to use a segmented control as an alternative to a list control to present a small set of relevant values to choose from. You can also use a segmented control like a toggle switch, to change between different views of related content. For example, if you segment your webinar registrations by customer type, you can build one workbook with all relevant data and use a segmented control to switch between relevant customer groups: new, prospect, existing, all.

## User requirements

* You must have **Can edit** [access](/docs/folder-and-document-permissions) to the document, or **Can explore** access to the workbook to make changes in a custom or saved view.

## Create a segmented control

To create a segmented control, do the following:

1. Open the document for editing.
2. Add a control element from either the **Add element** bar or from a column:

   * **Column**: Right-click the name of your desired column, then select **Add control**.
   * **Add element** bar: On the **Add element** bar, select **Controls**, then select **Segmented control**.

   The new control appears on the canvas.
3. Select the control element, then in the **Properties** tab of the editor panel, configure the control. See [Configure the control](#configure-the-control).
4. (Optional) Select **Targets** to specify which elements to filter or modify when the user interacts with the control. See [Specify the target of the control](#specify-the-target-of-the-control).

## Configure the control

To configure the control behavior, select the **Settings** tab, then choose the attributes of the segmented control.

A segmented control can contain a maximum of 7 values. You can populate the values used by a segmented control in different ways:

* Create a [manual list](#use-a-manual-list). For your control to work, the list must correspond in some way with the data in the target data elements.
* Create a [list from a preset](#use-a-list-from-a-preset) defined by Sigma.
* Use a [column in your data](#use-a-column-from-a-data-element-or-data-source). The control uses the first 7 values in the column. You can change the sort order to modify which column values are used.

After the control values are populated, you can perform additional configuration steps:

1. (Optional) To allow users of the control to reset the control so nothing is selected, select the checkbox to **Show clear option**. By default, the label for this option is **None**, but you can enter a different label in the text box to change it.

2. (Optional) To make sure that targeted data elements only load after a user makes a selection on the control, select the checkbox for **Required**.

3. (Optional) Decide whether to update the default **Control ID**. See [About control IDs](/docs/intro-to-control-elements#about-control-ids).

### Use a manual list

You can create a manual list to select custom values. You still reference a data table or a data element, but you can directly name the data segments you want to use, regardless of their relative frequency in the data.

1. In the **Properties** tab for the control, select the **Settings** tab.
2. For **Value source**, select **Create manual list**.
3. For **Value type**, specify the data type of the values that you add manually. The data type must match the data type of the columns targeted by the control. Choose between [Text](/docs/data-types-and-formats#text) (default), [Number](/docs/data-types-and-formats#number), [Date](/docs/data-types-and-formats#date), and [Boolean](/docs/data-types-and-formats#logical).
4. For **Values**, enter a custom list of values to use for the control. Press enter or return to add new values. You can optionally specify a display value to show in the control instead of the raw data value.

For example, you can create a manual list of text values that correspond to the states in the New England region of the United States: Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont.

You can specify the display values as the full state names, but use the state abbreviations as the data values to correspond with a column in the targeted data element.

![The Properties panel for a segmented control set to a manual list of New England states, with full state names as display values and abbreviations as data values, beside the STATE\_INFO\_JSON data table.](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/de89c0180c3ed7a2dd739f9c965db1a9f1fd8766a1df9e9c11d35f754d9e2b5d/assets/images-archive/384eb4a30782abfaabe4065cc7313163ffdc20269f4e732b1fc993f1f4ff1a46-seg-states.png)

### Use a list from a preset

This option lets you choose from a common set of presets: Month names, Weekday names, and Date parts. After you select one of these options, your control is a manual list. You can change it, remove values, and add new values.

1. In the **Properties** tab for the control, select the **Settings** tab.

2. For **Value source**, select **Create list from preset** and choose one of the preset options:

   * Month names
   * Weekday names
   * Date parts

3. After selecting a preset list, the **Value type** and **Values** automatically update. The **Value source** changes to **Create manual list** to reflect that a preset list is a pre-populated manual list.

4. Modify the preset list as desired, removing unneeded values and changing display values. To delete a value, hover over the value and select **x**.

### Use a column from a data element or data source

1. In the **Properties** tab for the control, select the **Settings** tab.
2. For **Value source**, select a data source or data element in use on the workbook.
3. For **Source column**, the first column of the data source is shown. Select the column to open a drop-down menu and choose the column that you want to use to populate the control.

   By default, the control uses the top 7 most frequent values in that column. Select **Sort** (<img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/sort_desc.svg" alt="" />) to change the sort order from the default of **Descending by count** to **Ascending by count**, **Ascending by alphanumeric**, or **Descending by alphanumeric**. Custom sort orders are not supported.
4. (Optional) To use a different related column as the display values for the data, turn on the toggle switch to **Set display column** and choose a display column from the same data source. For example, you might use an ID column as the data source, but a name column as the display value.
5. (Optional) To allow users of the control to reset the control so nothing is selected, select the checkbox to **Show clear option**. By default, the label for this option is **None**, but you can change it.
6. (Optional) To make sure that targeted data elements only load after a user makes a selection on the control, select the checkbox for **Required**.
7. (Optional) Decide whether to update the default **Control ID**. See [About control IDs](/docs/intro-to-control-elements#about-control-ids).

## Specify the target of the control

Add targets to a control to specify which data elements and data sources to filter:

1. Select the control, then in **Properties**, click **Targets**.

   ![Element properties panel with the control selected, hovering over the Targets tab between Settings and Synced.](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/b27fb983a2627324f1154484cc2ff47491373de0252a19c9cd3a604379b8f36e/assets/images-archive/2f7882d1e833e451ba1de27a7fe3a9223d43dddddb9271d92232a6008ae9e2af-seg-set-target.png)

2. Click **+** (**Add filter target**).

3. Select one or more elements in your workbook that you want to be changed by the control.

   In this example, the data element table `VIOLATION_TYPES` is selected. The table is on the same page of the workbook as the control.

   ![The target selection drop-down with a search box, listing the VIOLATIONS and VIOLATION\_TYPES data sources and expandable pages, with the VIOLATION\_TYPES table on Page 3 highlighted.](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/0a4827cc1b2ecccce312c0904280416509b57a0ee45bde2bcac37ef3552b2fb1/assets/images-archive/048907d77cb24c65b791a30bebcb422bad8e7696465a239ff659d32347537627-seg-choose-target.png)

   The table appears under **Targets**, and the count of targets for the control increases to 1. As you add other targets to this control, the count increases.

4. Update the column targeted by the control. By default, the control targets the first column of the table. To change the target column, click the current column and choose the new target column. In this example, the target column **Risk Category** is correct for the control.

   As you change the target column, the default name of the control updates to match the selected column. In this example, the name of the filter control was **New Control**, then it changed to **Risk Category** when the table was added as a target.

## Format and design a segmented control

You can format and design the segmented control to match the styling of your workbook. To review and update the formatting options, select the **Format** tab.

### Responsive appearance

When the values for a segmented control are too long to fully display in a document, the control appears as a drop-down menu instead of truncating the text in the control.

For example:

| Display                           | Appearance                                                                                                                                                                                                                                                                                               |
| :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Segmented control with all values | ![A segmented control labeled New England State showing all six values in full — Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont — with Connecticut selected.](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/ed10cf900a2e3cccf1b2507d969478a8deefab524450eb5c987c0ef0d3150d3b/assets/images-archive/0661a2894bdfd8d3f7dd8172128aec540d0878324a30a3f4350253cf5087a411-state-full.png)   |
| Segmented control dropdown        | ![A segmented control labeled New England State collapsed into a drop-down menu, open to show the values Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont.](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/126375076bb99e88b8d2bae7440a44a4a9221509a58db9ac63f0455ce840a1c0/assets/images-archive/fe58e1d03d71f78b2198c100e268bea2891cff4a8b473df5cc16725e7c8f6452-seg-dropdown-new.png) |

### Update the element style

You can customize the style of the element, such as the background. See [Customize element background and styles](/docs/customize-element-background-and-styles).

### Update the control label

| Option                     | Description                                                                                                                                                                                           |
| :------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Show label**             | Select the checkbox to show a label on the control. A label is shown by default, either "New Control" or a label that matches the column name used to populate the control. You can update the label. |
| **Bold**                   | Bold the label text.                                                                                                                                                                                  |
| **Text color**             | Update the color of the label text.                                                                                                                                                                   |
| **Label position**         | Choose whether to position the label at the **Top** of the control, or to the **Left**.                                                                                                               |
| **Show description**       | Select the checkbox to show a description on the control. You can provide up to 200 characters of text as a description.                                                                              |
| **Description formatting** | If a description is shown, you can bold the description text and update the text color.                                                                                                               |
| **Description display**    | If a description is shown, you can choose whether to display the description as a **Subtitle** or **Tooltip**, or use the **Auto** setting, which defaults to a tooltip.                              |

### Update the alignment of the control

You can align a segmented control within the element boundaries on the workbook canvas.

Choose from the following horizontal alignment options:

| Alignment setting                                                                                                              | Example                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Left align** (<img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/align_left.svg" alt="" />) (default) | ![Segmented control aligned to the left of an element showing top 7 traffic sources above a bar chart showing top 10 traffic sources](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/4b1918e450e13a98c157fe8cacf58cdaf1e5b51ec03264af62fea2c339d6edc2/assets/docs-images/c62743accc7788b830cdfe4a724277d38941da53865b0623580bbcc5d0e8e6f9-segment-left.png)              |
| **Right align** (<img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/align_right.svg" alt="" />)         | ![Segmented control aligned to the right of an element showing top 7 traffic sources above a bar chart showing top 10 traffic sources](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/e0b4e82b4955041f39727e6078620d7e8ae806d6047df47c497e8e1e53f1f101/assets/docs-images/2d3d658fa5b24d85e4157927583a513168adba588bfd8a162bae968b77eb81a9-segment-right.png)            |
| **Stretch** (<img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/align_stretch.svg" alt="" />)           | ![Segmented control stretched to the entire width of an element showing top 7 traffic sources above a bar chart showing top 10 traffic sources](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/1267367b5672f2f6de277ee82c372b5cb71ddcfe9100f4fbb22255c0e6ce82cf/assets/docs-images/5405ae542efca8ac973dd25b4053ff72f2be3a13b12514871b0ec8d83b0bf5e8-segment-stretch.png) |

You can also change the vertical alignment of the control within the element boundaries. Choose one of:

* **Top align**
* **Center align**
* **Bottom align**

## Related resources

* [Intro to control elements](/docs/intro-to-control-elements)
* [Create and manage a control element](/docs/create-and-manage-a-control-element)
* [Reference control values as parameters](/docs/parameters-in-workbooks)