Create parameters
A parameter is a container or a placeholder such as a number, date, or string that can replace a constant value or a list of values. Create Worksheet parameters to optimize your data inquiries. Use parameters to run different scenarios with adjustable values, without creating or modifying the constants in formulas for each new value.
Parameters are useful for 'what-if' analysis, financial planning, cohort analysis, and so on. When you create parameters for your Worksheet, you guide users in their exploration of the data as they search on your Worksheet.
For a parameter to be used in a Liveboard, you must create it in a Worksheet. |
Creating parameters
There is no maximum number of parameters you can create for a single Worksheet or Answer. However, parameters don’t work across Worksheets or Answers. They only affect a single Worksheet or Answer.
Creating Worksheet Parameters
To create a Worksheet Parameter, follow these steps:
-
Navigate to the Worksheet to which you would like to add a Parameter.
-
Select Edit Worksheet in the upper right corner.
-
In the Data panel on the left of your screen, select the + button that appears when you hover over the Parameters section.
-
The Create parameter dialog appears:
-
In the Parameter name text box, enter a name for your Parameter. This name should be unique for the object, and easy for users to understand.
-
Optionally, enter a description for the Parameter in the Add a description text box. Use this field to add additional information users might need before using this Parameter in their analysis. It is a best practice to use this field to specify the formulas this Parameter is used in, in addition to any other information you add.
-
Under Data settings, specify the data type the Parameter must be: Integer, Double, String, Boolean, or Date. For more information about data types, refer to Data types.
-
For integer, double, or date data types, specify the allowed values: Any, List, or Range. For the string data type, specify either Any or List.
Any Allows any value within the data type’s constraints.
List Allows values only in the list you create. Enter a value in the Enter value… text box, and optionally enter what the value should display as in the Display as… text box. To add more values, select + Add row. To delete values, select the x to the right of the row the value is in.
Range Allows values only within the range you specify. In the Minimum value and Maximum value text boxes, specify the values the range begins and ends with.
-
For the boolean data type, optionally set custom names for
true
andfalse
; for example,0
and1
. -
Set the default value for your Parameter. In the default value text box, enter the value this Parameter should default to. For the boolean data type, the Default value option is a dropdown.
true
andfalse
are the only options. -
Select Save.
-
Save your Worksheet. Select Save in the upper right corner.
Creating Answer Parameters
To create an Answer Parameter, follow these steps:
-
Navigate to the Answer to which you would like to add a Parameter.
-
In the Data panel on the left of your screen, select the + button in the Parameters section.
-
The Create parameter dialog appears:
-
In the Parameter name text box, enter a name for your Parameter. This name should be unique for the object, and easy for users to understand.
-
Optionally, enter a description for the Parameter in the Add a description text box. Use this field to add additional information users might need before using this Parameter in their analysis. It is a best practice to use this field to specify the formulas this Parameter is used in, in addition to any other information you add.
-
Under Data settings, specify the data type the Parameter must be: Integer, Double, String, Boolean, or Date. For more information about data types, refer to Data types.
-
For integer, double, or date data types, specify the allowed values: Any, List, or Range. For the string data type, specify either Any or List.
Any Allows any value within the data type’s constraints.
List Allows values only in the list you create. Enter a value in the Enter value… text box, and optionally enter what the value should display as in the Display as… text box. To add more values, select + Add row. To delete values, select the x to the right of the row the value is in.
Range Allows values only within the range you specify. In the Minimum value and Maximum value text boxes, specify the values the range begins and ends with.
-
For the boolean data type, optionally set custom names for
true
andfalse
; for example,0
and1
. -
Set the default value for your Parameter. In the default value text box, enter the value this Parameter should default to. For the boolean data type, the Default value option is a dropdown.
true
andfalse
are the only options. -
Select Save.
-
Save your Answer. Select the more options menu in the upper right corner, and select Save.
Editing and deleting Parameters
To edit or delete existing Parameters, follow these steps.
You can only delete Parameters that are not in use in any formula, Answer, or Liveboard. If a Parameter is in use in any objects, you must first remove the Parameter from these dependents, then delete the Parameter. For Parameters that are in use, you can only edit the following fields: Name, Description, and Default value. |
Editing and deleting Worksheet Parameters
-
Navigate to the Worksheet with the Parameter you would like to edit or delete.
-
Select Edit Worksheet in the upper right corner.
-
In the Data panel on the left of your screen, select the Down arrow to the right of the Parameters section. This expands the list of Parameters.
-
To edit a Parameter, select the edit icon to the right of the Parameter name.
Note that you may not be able to edit all fields, if the Parameter is in use in formulas, Answers or Liveboards. For Parameters that are in use, you can edit the following fields: Name, Description, Allowed values, and Default value. You can also add or delete values from a list parameter while it’s in use, or increase or decrease the minimum and maximum values in a range parameter.
To edit other fields, you must first remove it from these Answers and Liveboards. To see which Answers and Liveboards use the Parameter, select View Details in the Edit parameter dialog that appears.
-
Make your changes, and select Save.
-
To delete a Parameter, select the delete icon to the left of the Parameter name.
Note that you may not be able to delete the Parameter, if the Parameter is in use in Answers or Liveboards. You must first remove it from these Answers and Liveboards. To see which Answers and Liveboards use the Parameter, select View Details in the Delete this parameter dialog that appears.
-
Select Delete in the dialog that appears.
-
Save your Worksheet. Select Save in the upper right corner.
Editing and deleting Answer Parameters
-
Navigate to the Answer with the Parameter you would like to edit or delete.
-
In the Data panel on the left of your screen, select the arrow to the right of the Parameters section. This expands the list of Parameters.
-
Select the more options menu .
-
To edit a Parameter, select Edit.
Note that you may not be able to edit all fields, if the Parameter is in use in a formula in the Answer. For Parameters that are in use, you can edit the following fields: Name, Description, Allowed values, and Default value. You can also add or delete values from a list parameter while it’s in use, or increase or decrease the minimum and maximum values in a range parameter. To edit other fields, you must first remove the formula from the search.
-
Make your changes to the Parameter, and select Save.
-
To delete a Parameter, select Delete.
Note that you may not be able to delete the Parameter, if the Parameter is in use in a formula in the Answer. You must first remove the formula from the search.
-
Select Delete in the dialog that appears.
-
Save your Answer. Select the more options menu in the upper right corner, and select Save. == Using parameters
After you create parameters for your data, use them to run different scenarios when searching on your data or viewing Liveboards or Answers. To learn how to use parameters, see Using parameters.