Version 2020

Functions Reference

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 create filters, define attribute forms, and so on.

This guide provides the following information:

  • Details of function syntax and the components of a function formula
  • Explanation of where functions can be used in expressions
  • Steps to access functions from MicroStrategy Developer
  • Overview of the MicroStrategy engine and how Intelligence Server uses functions
  • Examples of functions used in complex business scenarios
  • Details of function support in certified databases

This guide does not include information on Data Mining functions. This information can be found in the Data Mining Services chapter of the Advanced Reporting Guide.

These details are described in the following chapters:

Understanding Functions in MicroStrategy
Standard Functions
Operators
Plug-In Package Functions
MicroStrategy and Database Support for Functions

Function categories

For the purposes of this guide, functions are organized into the following categories:

Standard Functions
Basic Functions
Date and Time Functions
Internal Functions
NULL/Zero Functions
OLAP Functions
Rank and NTile Functions
String Functions
Operators
Arithmetic Operators
Comparison Operators
Comparison for Rank Operators
Logical Operators
Plug-In Package Functions
Data Mining Functions
Financial Functions
Mathematical Functions
Statistical Functions

Function descriptions

For every function identified, the description includes:

Information returned
Function syntax
Expression representative of the function (as applicable)
Notes regarding restrictions or conditions on execution and use (as applicable)
Examples of the function in reports or through simple descriptions

The following sections provide the location of additional examples, list prerequisites for using this book, and describe the user roles the information in this book was designed for.

The sample documents and images in this guide, as well as some example steps, were created with dates that may no longer be available in the MicroStrategy Tutorial project. If you are re-creating an example, replace the year(s) shown in this guide with the most recent year(s) available in the software.