Segmented control

A segmented control is a linear strip of two or more named segments; each of the segments acts exactly like a radio button, selecting the matches and excluding other data records. When you have to make selections from a long list of values, segmented controls can be a better option because they provide a smaller subset of relevant values, a more economical dashboard layout, and a nicer overall experience for viewers.

You can use a segmented control as a multi-toggle to switch between alternative views of related content. For example, you can choose to view population data according to age groups: under 5, 5-17, 18-24, 25-34, 35-44, ... , 100 and over.

There are two types of segmented controls:

  • Segmented control from a manually-entered list, including a preset list for date-type values; this is not completely arbitrary, because you must have values that select data on the target of the control.
  • Segmented control based on a column in the data source or workbook element; these controls can have a maximum of 5 distinct values, sorted on record count or alphabetically.

Create a segmented control

Follow these steps to create a segmented control.

For a working control, you must specify the target, and select the source of segments.

  1. In your workbook, in edit mode, click Add element.
  2. On the left navigation panel, scroll to Control elements and select Segmented control.
    Screenshot of segmented control option in the add new element panel.
    The new segmented control appears on the canvas.
  3. Choose column-based or manual values from the control. See Value source.
  4. Specify what changes happen when the user interacts with the control. See Specify the target of the control.

To adapt the new segmented control for your use case, both from a functional and visual perspectives, see Configure settings.

Specify the target of the control

Follow these steps to connect the control to its target tables and visuals. This example demonstrates how to connect to the a table element on the page.

  1. After selecting a control, click Targets.
    Page overview with control selected, hovering over the Targets option next to Settings and before Synced.
  2. Under Targets, click + Add filter target.
    Targets tab showing add filter target option.
  3. Select the element that the new control changes.
    In this example, the Data element table PLUGS_ELECTRONICS_HANDS_ON_LAB_DATA is selected. The table is on the same page of the workbook as the control.
    Selecting a data source or data element to apply the control to.
  4. 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. For example, the control can also target a bar chart, a pivot table, and so on.
    Targets tab showing a value of 1 and showing the table as an affected data element.
  5. By default, the first column of the table is the target of the control. To change the target column, click the current column and choose the new target column. In this example, the default column SKU Number is replaced with the column Store State.
    Changing the target column from SKU Number to store stage.
  6. After you change the target column, the default name of the control changes to match the selected column.
    In this example, the name of the filter control was New Control 1, then it changed to Sku Number when the table was added as a target, and then changed again to Store State when the target column was updated.
    Target column changed

Configure Settings

To configure the control behavior and appearance, click Settings, and choose the attributes of this segmented control.

There are two basic types of segmented controls:

  • Manual list: Add segment names that best characterize the data. There is no practical limit to the number of segments you can add, but keeping it to a reasonable number leads to the best user experience. You can also choose List of a preset for a date filter and choose month names, weekday names, or date parts. See Manual lists and presets.
  • List from a column: After you select a source column, Sigma automatically builds a filter of up to 5 segments, depending on the diversity and relative count of data in the column. This column can either be from a data source, or from a data element in the workbook. See Data sources and elements.

Control type

This is a Segmented control. If you want to change it to another type of control, click the value selected for Control type and select one of the other control types.

Value source

Choose from a number of source options to identify the segments for the control:

Data sourcesThe segments of the control originate in the actual data source of the workbook.
You must choose the table and the column, then Sigma selects up to 5 values to create segments.
By default, the most common segment values in your data are used.
Data elementsThe segments of the control originate in one of the elements on the workbook. Commonly, it is identical to the target source of the workbook. See Specify the target of the control.
You must choose the table and then the column. Sigma selects up to 5 values to create segments. By default, the most common segment values in your data are used.
Create manual listYou can create a manual (custom) list to select specific 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.
There is no strict limit to the number of values you can use to create segments. To optimize the user experience, limit the number of segments.
Create list from presetThis option lets you chose 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.

Manual lists and presets

If you choose a manual list or preset list, complete the following fields to configure your control.

Settings for segmented controls that use manual input or preset lists

Value type

This is the data type of the segment values that you add manually.

The options are Text (default), Number, Date, and Boolean.

If you use a preset source, it automatically sets the value type.

Values

After you choose either Manual list or Preset in the Value source, the values for the manual segments display here.

You can choose between manual and preset.

When you enter the values manually, create values by pressing return or enter.

In the following example, the values represent all the states that comprise the New England region of the United states: Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont.

New segment values, entered manually

If you find that some values in your list don't have matching data in your target element, you can remove that value from the segmented control. In this example, there are no stores in either Connecticut or Vermont. To delete individual values, hover over the value and click trash (delete).

Delete a manually-entered value.

When using the preset list values, choosing the preset populates both the Values and the Value type.

For example, if you choose the Weekdays preset, Sigma populates the values, and the Value source becomes a Manual list:

Segmented control from preset

You can add and remove values if you populated the segment control from a preset list.

Set display values

If you want to change the labels of the segments that appear in your control, you can turn on this toggle.

For example, you can replace a code value from the data with something more clear for the users of your workbook or replace a lengthy value with an abbreviation.

The original value appears at the top, and the display value that appears in the segment is below it. You can make changes to the display value.

For example, this screenshot shows the preset list for weekdays with changes for display values:

Segmented control from preset, change to display values, plus two renderings of the control in published state

Display as card

This option formats the published version of the control as one of two options:

  • Default control that blends with the canvas
  • Control on white background

Change display from default to card

Required

Ensures that target elements load only after the user makes a selection.

Control ID

Sigma uses this automatically-generated value for internal references between controls and their targets. Some API endpoints also use this ID.

Changing a control ID can break existing parameter references that already use the ID. Instead, change the control label to improve clarity without changing the ID.

When you duplicate a control, the new control has the same behavior and formatting as the original but with a new unique ID. See Duplicate controls.

When you sync controls, they share the same ID. See Synced controls.

Control label

You can change the title of the segmented control to improve the user experience. For example, if you have a page with many visual elements and controls, you can choose to specify what the control changes.

If the nature of the control is obvious, the label might be redundant so you can deselect the option.

This screenshot shows an example of the weekday control in published form, with and without the label:

Add or remove control label

Reset

Resets the control to the original default.

Data sources and elements

If you choose to populate the control from a data source or element, complete the following fields to configure your control.

Settings for segmented controls based on data columns

Source column

After you select the Value source, the Source column shows the first column of the data source.

Click the value and select the column that you want to use for segment values.

The limit is 5 values. Use your business scenario to determine which 5 values must appear on the control. By default, segmented controls based on a data source use the 5 most frequent values in your data, or top 5 Descending by count. To change this, click the Sort widget, and select one of the other options: Ascending by count, Ascending alphanumeric, or Descending alphanumeric.

Sorting segment values

Set display column

Depending on the structure of your data, you might choose to get the values from one column and display another column.

For example, if you use a data source made up of several joined tables, you might want to pull the Store ID as the Source column, but display the Store name in the control.

Display as card

This option formats the published version of the control as one of two options:

  • Default control that blends with the canvas
  • Control on white background

Required

Ensures that target elements load only after the user makes a selection.

Control ID

Sigma uses this automatically-generated value for internal references between controls and their targets. Some API endpoints also use this ID.

Changing a control ID can break existing parameter references that already use the ID. Instead, change the control label to improve clarity without changing the ID.

When you duplicate a control, the new control has the same behavior and formatting as the original but with a new unique ID. See Duplicate controls.

When you sync controls, they share the same ID. See Synced controls.

Control label

You can change the title of the segmented control to improve the user experience. For example, if you have a page with many visual elements and controls, you can choose to specify what the control changes.

If the nature of the control is obvious, the label might be redundant so you can deselect the option.

In this example, the upper control uses the name of the column as the label, which is the default approach. The lower control has been updated to "Store states for most purchases" and the control is displayed as a card:

Both published controls, first with Store State as the control label as the default, and the second with the described new label

Reset

Resets the control to the original default.