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:
- On the Model Or Global page, select Global.
- 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.
- 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.
- Select the default value for your widget from the Parameter Values drop-down.
Binary parameters are always Global. For more information, see Parameters in Formulate.
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.
Tip: You can see what your widget will look like in the Step Preview - Default panel when you click F2.
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:

Step 1: Open the Parameter Builder
In Formulate:
- Start by opening the Parameters module:
The Parameter builder opens. Note that the Parameter builder is a wizard-like tool, where you will step through the pages (linked from the left) to provide all the necessary details to create your parameter.
Step 2: Select the Parameter Scope
When the Parameters module opens, the Model Or Global option is selected in the Steps panel:
- Select Global to indicate that you want to create a Global parameter.
Step 3: Specify the Parameter Type details
From the Parameter Type page:
- Under Selections, select Binary.
- Specify the Parameter Values for our example:
- On: Where the parameter is "on," the Caption should be Gross (orange arrow below) and the Value should be G (purple arrow).
- Off: Where the parameter is "off," the Caption should be Net and the Value should be N.
This indicates that you are creating a Binary parameter (a switch with an On and an Off state).
Step 4: Specify the defaults
From the Default page:
- Leave the Visualization option as is.
- Select Gross from the Parameter Values drop-down.
- Save your Parameter.
This effectively indicates that you want this switch to be rendered as a Toggle button when it is added to a discovery or presentation.
This selection indicates that the Gross value should be selected by default. (The Margin column should typically show the Gross value.)
Note: Click Run (top left) or F2 to run the formula and open a preview in the right-hand Step Preview - Default panel (yellow highlight below).

We are going to use an "If" formula to select different measures given different selections from the Toggle.
Step 1: Create a Formula
Open the Formula tool and select the server, database, and data model:
Step 2: Select Cost and Sales measures
As is typical, you build the formula that indicates what to do with your Binary Parameter by dragging and dropping different blocks onto the canvas.
The example Formula is an If statement:
- When the value selected from the Binary Parameter is "G," the measure Margin is selected.
- Otherwise, the measure Net Margin is selected.
Binary Parameter
Use the Binary Parameter element block (orange highlight below) to drag the parameter into your Formula. Once the block is added to the canvas, you need to select it on the canvas and then select the parameter you created in the Select Elements panel.
Tip: You may need to Refresh (yellow arrow) to see your parameter.
Once you have created your Formula, you should Run it using the Pyramid button or by pressing F2. You should check the output in the Result Preview and Syntax Preview panels and Save your Formula with a recognizable name.
- Click here for more information about the Preview panels

Now that you have your Formula, you should add it to a discovery. There are two options:
Create a new discovery
To create a new discovery and add your Formula to it in one action, click Quick Discovery in the ribbon:
Note: The Quick Discover button is only enabled once you have saved your Formula.
Add to an existing discovery
To access your Formula in Discover:
- In the Measures panel, click the Show Business Logic (Fx) button (green arrow below).
- Find your custom formula in the folder tree (blue arrow) and do one of the following to add the formula to your drop zones:
- Select the checkbox alongside your formula.
- Double-click the formula.
- Drag and drop the formula into your drop zones.
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.