MicroStrategy ONE

Types of functions

Functions are designated by a function name. Functions act on data (arguments) and are given direction in their calculation by function parameters. They can be used in subtotals, filters, transformations, and so on. (See Using functions in MicroStrategy.)

MicroStrategy has five types of functions:

  • Single-value functions: are also known as Non-grouping or Scalar functions. They operate on each individual element of an input variable or argument, resulting in an output element for each. Examples of this category are simple mathematical operators (+, -, *, /), Abs, Accrint, Cos, Round, Truncate, ApplySimple, and so on.

  • Group-value functions: are also known as Grouping or Aggregate functions. They take one or more lists of values as input and generate a single output value for each list. Examples of this category are Avg (Average), AvgDev, Count, HomoscedasticTTest, Sum, ApplyAgg, and so on.

  • OLAP functions: are also known as Relative functions. They take multiple elements from a list and return a new list of elements. Each element is related to and dependent on another element or other elements in the list, and the position of this element determines how computation is performed. Examples include Rank and NTile functions, RunningSum, MovingAvg, ApplyOLAP, and so on.

  • Logical functions: provide basic comparison and return TRUE or FALSE values based on the evaluation of the formula. This type of functions includes And, Or, Not, and ApplyLogic.

  • Comparison functions: compare single values or lists of values, or compare a list to a threshold value. Examples of this category are Between, Like, Greater than(>), Less than (<), ApplyComparison, and so on.

For additional information on and examples of functions, see the Functions Reference.