Skip to main content
Skip table of contents

Formula basics

Overview

Formulas define how a node is calculated in a model. They combine node references, operators, and functions to calculate values across time and other business dimensions.

Use this page to learn the core syntax before diving into the full Operators and Function catalog.


Core syntax conventions

Referencing nodes

  • Use single quotes around node names: 'Revenue'

  • When you type a single quote (') in the function editor, Valsight shows a list of available nodes, including nodes from submodels.

Constants

  • You can write numbers directly in formulas: 0, 1.2, 100000

  • Numbers have no dimensions (they’re a single value).

Operators

  • Arithmetic: +, -, *, /

  • Comparisons: =, !=, <, <=, >, >=

  • Boolean logic: AND, NOT, OR, XOR, TRUE, FALSE

  • Operators can be nested and combined with functions.

Functions

  • Functions are named operations that transform, filter, or compare values

  • Function names are case-sensitive and written in uppercase, for example EXPAND, FILTER, IF

  • They consist of comma-separated arguments inside parentheses

  • Functions can be nested and are evaluated inside out (inner results first).

Dimensions, levels, and level values

  • Dimensions and levels describe which business axes a value is defined on and at what detail.

  • Use double quotes for dimension names, level names, and level values: "Time", "Year", "2024"

Value lists

  • Use square brackets for lists of values: ["EMEA", "APAC"]

Project variables

  • You can use project variables as placeholders in functions.

  • Type $ to select a variable from the list, for example $FORECAST_START

Comments

  • Use # to add comments in the function field.


Common formula shapes

  • Arithmetic: 'Revenue' - 'COGS'

  • Data reference: DATA("ERP", "Actuals", "Volume")

  • Reshaping: EXPAND('Sales', "Product")

  • Filtering: FILTER('Sales', "Region", ["EMEA", "APAC"])

  • Conditional logic: IF('Margin' < 0, 0, 'Margin')


Related sections

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.