Version 2021

# Insert Function Wizard

The Insert Function Wizard is the tool that helps you add a function to a metric expression, such as a metric formula or a fact expression. The wizard helps you find a function and define its arguments, parameters, BreakBy parameter, and SortBy parameter:

• Arguments are the input values of a function. For example, the arguments of the Average function can be the metric to be averaged.

• Parameters are the properties that determine a function's behavior. For example, you can set whether the Count function is Count distinct by using the appropriate parameter.

• BreakBy is the logical level where the calculation of values for an expression restarts. To break by an attribute or hierarchy means to restart counting values for expressions that use relative functions. Examples of relative functions are RunningStdevP, Rank, NTile, and expressions that calculate rank or percent values. The break by level must be greater than or equal to the level of aggregation for the expression itself.

• SortBy is the order of the return values of an expression in relation to the order of the value or metadata object given. A sort by includes whether to sort in ascending or descending order, and which metadata object to sort by. Sort by may also be performed on the value of the subexpression, which is the input argument.

Before you use the Insert Function Wizard, you should familiarize yourself with:

• The purpose of functions in expressions

• The role of arguments and parameters in functions

For more information on these topics and functions in general, see the Functions Reference.

## Insert Function Wizard contents

The Insert Function Wizard consists of the following pages:

Only the Select Function page is required to insert a function; the remaining pages are displayed only when the selected function requires arguments or parameters.

After you complete the wizard, the arguments and parameters you selected are displayed next to the function in the expression formula.

## Accessing the Insert Function Wizard

The Insert Function button, which is displayed as f(x), is available from the following:

• Attribute Editor (when creating or editing the form expression)

• Input Metric Formula dialog box (when creating or editing the formula of a derived metric)

• Fact Editor (when creating or editing a fact expression)

• Filter Editor or Custom Group Editor (when creating or editing a custom expression type of advanced qualification)

• Metric Editor or Subtotal Editor (when creating or editing the formula definition)

• Transformation Editor (when creating or editing a member attribute expression)

For steps to access the Insert Function Wizard from each of the interfaces listed above, refer to Accessing the Insert Function Wizard.