Visier Modeling Language (VML)

Use the Visier Modeling Language (VML) to define plan items in the Visier platform.

This is a complete list of the syntax and functions you can use to define your plan items. Each definition includes a description and a real-life example.

Aggregation

Use aggregation functions to return aggregate values, like average, sum, min, max.

max

Returns the maximum between two numbers.


min

Returns the minimum between two numbers.


pow

Returns a value raised to the power of an exponent.


Operator

Use operators to perform math, comparisons, logical tests, and set variables.

!

Keyword to negate an expression. This is interchangeable with not.


!=

Compares two values and returns true if they are not equal.


&&

Compares two conditions and returns true if both are true. This is interchangeable with and.


*

Multiplies two values. This operator can be applied to constant values, plan items, inputs, and other calculated values.


+

Adds two values. This can be applied to constant values, plan items, inputs, and other calculated values.


-

Subtracts two values. This operator can be applied to constant values, plan items, inputs, and other calculated values.


/

Divides two values. This can be applied to constant values, plan items, inputs, and other calculated values.


<

Compares two values and returns true if the one value is less than the other.


<=

Compares two values and returns true if the one value is less than or equal to the other.


=

Compares two values and returns true if they are equal. Also can be used to create a new object to reference in a formula.


>

Compares two values and returns true if the one value is greater than the other.


>=

Compares two values and returns true if the one value is greater than or equal to the other.


and

Compares two conditions and returns true if both are true. This is interchangeable with &&.


else

Keyword to define a conditional statement that returns the value of a given object if the data point does not pass any preceding filters. This is used in conjunction with if.


false

Returns the boolean value false.


if

Keyword for starting the definition of a conditional function that returns the value of a given object if the data point passes a given filter. This is used in conjunction with else.


not

Keyword to negate an expression. This is interchangeable with !.


or

Compares two conditions and returns true if one condition is true. This is interchangeable with ||.


true

Returns the boolean value true.


||

Compares two conditions and returns true if one condition is true. This is interchangeable with or.


Time

Time functions are helpful when working with date and time attributes. For example, you can shift a date forward or backward by a number of days, weeks, months, or years.

annualize

Returns a value scaled to a full year by multiplying it by the number of months in the business calendar.


days

Returns a period type that represents a specified number of days. This function acts as a wrapper around a numerical value, making the day count recognizable and usable by other functions such as shift() to correctly interpret and apply time-based offsets.


daysInPeriod

Returns the number of days in the current time period.


deannualize

Returns a yearly value scaled down to a single period by dividing it by the number of months in the business calendar.


months

Returns a period type that represents a specified number of months. This function acts as a wrapper around a numerical value, making the month count recognizable and usable by other functions such as shift() to correctly interpret and apply time-based offsets.


perPeriod_average

Returns the average of all values from a specified start point up to the current time period.


perPeriod_max

Returns the maximum of all values from a specified start point up to the current time period.


perPeriod_min

Returns the minimum of all values from a specified start point up to the current time period.


perPeriod_product

Returns the product of all values from a specified start point up to the current time period.


perPeriod_productNoZero

Returns the product of all non-zero values from a specified start point up to the current time period.


perPeriod_sum

Returns the sum of all values from a specified start point up to the current time period.


periods

Returns a time period whose length automatically matches the time frame (e.g., months, quarters) of the current query.


periodsFromNow

Returns the number of time periods (e.g., months, quarters) between a data points period and the current evaluation period.


prev

Returns the value from the previous time period for a specified plan item. If there isnt a previous period, or if the plan item has no value in that period, it returns a fallback value. This fallback can be either an input derived from actuals for that same period or a direct numerical value.


prevWithSeed

Returns the value from the previous time period for a specified plan item. If there isnt a previous period, or if the plan item has no value in that period, it returns a fallback value. This fallback can be either an input derived from actuals for that same period or a direct numerical value. This function is a specialized version of prev(), a "seed" is an initial value or starting point. Its used when there isnt a prior value to draw from, such as at the very beginning of a timeline or a data series. The seed provides a default or baseline value, allowing calculations even when historical data is absent.


quarters

Returns a period type that represents a specified number of quarters. This function acts as a wrapper around a numerical value, making the quarter count recognizable and usable by other functions such as shift() to correctly interpret and apply time-based offsets.


shift

Returns a value from a different time period. It it uses three parameters: first, a parameter defining how far to shift in time, such as back(months(5)) to look five months in the past; second, a formula for planned periods, which is a projection formula used when the shifted time falls within your active plan; and third, a formula for unplanned periods, a different projection used if the shifted time is outside your active plan (for instance, in the historical past after a rebaseline). Both formulas pull data from the shifted time, ensuring you get relevant values whether the period is within your active plan or not.


weeks

Returns a period type that represents a specified number of weeks. This function acts as a wrapper around a numerical value, making the week count recognizable and usable by other functions such as shift() to correctly interpret and apply time-based offsets.


workingDaysInPeriod

Returns the number of working days in the current time period.


yearToDate

Returns the sum of all values from the first period of the year to the current time period.


years

Returns a period type that represents a specified number of years. This function acts as a wrapper around a numerical value, making the year count recognizable and usable by other functions such as shift() to correctly interpret and apply time-based offsets.


Unique

Specialized functions that perform specific operations.

back

Returns the opposite of time period or value. For example, back(10) returns -10.

Parameter types: (ProjectionCalculation)


ceiling

Returns any value with a decimal rounded up to the nearest whole number.


floor

Returns any value with a decimal rounded down to the nearest whole number.


forward

Returns the exact same value or time period that is given, without making any changes. Can also be used to shift periods forward.

Parameter types: (ProjectionCalculation)


isNaN

Returns true if a value is an invalid mathematical result, otherwise it returns false.


positionId

Returns a unique ID for a row based on its hierarchy members.


random

Returns a random decimal number from 0 up to (but not including) 1. The number will be the same every time the calculation runs.