Binary Parameters in Formulate

Binary parameters are used when you want to switch an option on or off, causing different values to be selected in the different binary states. You can use binary parameters throughout the application, including in formulas, logic, and lists. Binary parameters generate a "Toggle Slicer" visualization. You can add your final Toggle button to discoveries or presentations as required.

Binary parameters can only be global in scope.

Creating a Binary Parameter

To create a Binary Parameter:

  1. On the Model Or Global page, select Global.
  2. Binary parameters are always Global. For more information, see Parameters in Formulate.

  3. On the Parameter Type page, indicate that your parameter is a Binary type and specify its parameter values:
    • Caption: The display name for the value, will be shown in the visualization.
    • Value: The value that will be addressable in logical elements when the parameter is used.
  4. Note: The Caption associated with the current state of the toggle will be shown in a tooltip when you hover over the Toggle icon in Discover or Present.

  5. On the Default page, select the Visualization to use for this parameter when it is shown. This can be one of: Toggle (default), Drop Down, List Box, Buttons, or Text Box.
  6. Tip: You can see what your widget will look like in the Step Preview - Default panel when you click F2.

  7. Select the default value for your widget from the Parameter Values drop-down.

Once saved, you can add your Binary parameter to a formula as required. See below for a worked example.

Binary Parameter Example

The following example shows how to create a Binary Parameter and Toggle Slicer, add it to a Formula that selects between Gross and Net Margins, and add the resulting Toggle icon to your discovery for use. The purpose of this Toggle will be to indicate whether the Margin column should show the Gross Margin where the Toggle is on or the Net Margin otherwise.

Toggle between Gross and Net Margin

This example adds a Toggle to a grid in a discovery that includes a Margin column (purple highlight below). When the Toggle is "on," the Margin column shows the Margin value. When the Toggle is "off," the Margin column is updated to show the Net Margin instead:

Related information

Slicer Settings for Binary Parameters

As with other types of slicer, Slicer Settings allow you to change the way the slicer is visualized, the way it operates, and how it's styled. Binary Parameters have a subset of standard Slicer Settings, accessed from the context menu.

  • Click here for more information about Binary Parameter Slicer Settings
  • Click here for more information about Slicer Settings for other Slicer Types

Formatting your Toggle

If you have added your Binary Parameter to your discovery as a "Toggle," it looks like a sliding switch. Otherwise, it may be configured as a two-option drop-down, list, pair of buttons, and so on. Like Slicers, you can format the widget using the Format option on its context menu.

  • Click here for more information about Formatting Toggles
  • Click here for more information about Formatting other Slicer Types