Version 2021

Using functions in MicroStrategy

Functions in MicroStrategy are powerful tools used in expressions to define MicroStrategy objects and initiate complex user-selected calculations. Wherever you can define an expression, you can use a function. From creating basic objects to building complex reports and analyzing data, you have the ability to create custom expressions using a large library of functions supported by MicroStrategy. Although functions are most commonly used in metric expressions, they are also used to define attribute forms and create filters, facts, consolidations, custom groups, subtotals, and transformations, as described below.

Descriptions of each function, including information on the required syntax, arguments, parameters, and other pertinent details are provided in:

For additional details including use cases and in depth examples on how to use various functions, refer to the Functions Reference.

Functions are the basis for many MicroStrategy objects. They are used to create:

  • Attribute form expressions: Identifiers or descriptors of an attribute, such as a Name and Address. Attribute forms are defined by at least one expression, and these expressions act on column data and can contain functions.

  • Consolidation expressions: Consolidations enable you to group attribute elements for use in a report, without changing the structure of your metadata or your warehouse definition. The elements contained in a consolidation are called consolidation elements (CEs). Only single-value functions can be used in the definition of a consolidation element as well as calculations between consolidation elements. A consolidation element expression defines how the attribute elements are calculated

  • Custom group expressions: A custom group is an object that can be placed on a template and is made up of a collection of elements called custom group elements. A custom group can group attribute elements in a way that is not defined in the data warehouse. You can create relationships between the attribute and the custom group. A custom group expression defines how the elements in the custom group are calculated.

  • Fact expressions: Facts are objects created by and shared between MicroStrategy users. They relate numeric data values from the data warehouse to the MicroStrategy reporting environment. A fact expression defines how a fact is calculated. The fact expression is part of the Fact Definition component of a fact structure.

  • Filters: Advanced Qualifications. A filter is used to limit the amount of data displayed in a report. Filters are report objects or metric qualifiers that can be created using custom expressions employing functions.

  • Metric expressions: Metrics represent calculations performed on data. You can define metrics by using the available functions to analyze your data and determine business measures.

  • Subtotals: Subtotals allow you to dynamically control the computation and display of report data within desired groupings. Subtotals are applied to report metrics in order to calculate grand totals and for dynamic aggregation.

  • Transformations: Transformations are schema objects created using the Transformation Editor and implemented by inclusion in a metric.

To access functions

The Insert Function Wizard guides you through creating a function. For more information, see Insert Function Wizard.

Related Topics