Skip to content

Templated Functions

Templated functions are reusable formula patterns that expand into more complex expressions. They provide a simplified syntax for commonly used calculations, making your formulas easier to read and maintain.

What are Templated Functions?

A templated function acts as a shorthand for a predefined formula pattern. When you use a templated function, it automatically expands into the full underlying formula. This allows you to write concise expressions without repeating complex logic.

For example, instead of writing:

SUMIF([Quantity], [StockDate] = MAX([StockDate]))

You can simply write:

StockValue([Quantity], [StockDate])

Both expressions produce the same result, but the templated function is more intuitive and easier to remember.

When to Use Templated Functions

Use templated functions when you need to:

  • Simplify complex formulas - Replace multi-function expressions with a single, readable function call
  • Ensure consistency - Use the same calculation pattern across multiple columns or dashboards
  • Improve maintainability - Make formulas easier to understand for other team members
  • Speed up formula creation - Leverage pre-built patterns for common analytics tasks

Requesting Custom Templated Functions

If you find yourself reusing the same formula pattern frequently, you can request it to be made into a templated function. This is especially useful for:

  • Business-specific calculations that appear across multiple reports
  • Complex analytical patterns that your team uses regularly
  • Industry-standard formulas that would benefit from a simplified syntax

Contact your system administrator or support team to request a new templated function.


Aggregate Templated Functions

Aggregate templated functions are pre-built templates that combine aggregation with filtering or conditional logic. These functions use only stock (predefined) values and cannot be customized by users.

Available Functions

StockValue - Calculates the stock value by summing a number column filtered to the maximum date

Characteristics

  • Stock values only - These functions operate on predefined column data and do not accept custom expressions
  • Aggregate behavior - They collapse multiple rows into a single calculated value
  • Context filtering - They respect filters and groupings applied in your dashboard or table