Document List
On This Page

Expressions

Expressions

ProcessMind expressions let you generate rich text and dynamic content in your dashboards. With expressions, your dashboards become more engaging and automatically adapt to your data. This guide covers practical examples and notations to help you use expressions effectively.

Basics

You can use expressions to reference metrics and attributes directly in your text. This creates dynamic content that updates automatically as your data changes.

Example 1: Number of Cases vs Total Cases

To display the number of active cases versus the total, use:

Nr of cases in view: ${metric} / Total Cases: ${total}

Here, ${metric} is the current metric value and ${total} is the total number of cases.

Example 2: Cases Not Included

To show the number of cases not included (total minus current):

Nr of cases not included: ${total - metric}

Again, ${metric} is the current metric value and ${total} is the total number of cases.

Example 3: Percentage of Cases Using a Function

To display the percentage of cases in view compared to the total:

Percentage of cases in view: ${formatPercentage(metric)}

Here, ${metric} is the metric set to cases.


Available Functions

ProcessMind supports a variety of functions in expressions for calculations, formatting, and dynamic lookups. Combine these with your metrics and attributes for powerful, flexible outputs.

FunctionDescriptionExample
round(value, decimals?)Rounds a number to the nearest integer, or to a specified number of decimal places.${round(metric, 2)}123.46
power(base, exponent)Raises a number to a power (same as pow).${power(2, 3)}8
pow(base, exponent)Alias for power.${pow(metric, 2)}
sqrt(value)Returns the square root of a number.${sqrt(metric)}
abs(value)Returns the absolute value (removes negative sign).${abs(metric)}
ceil(value)Rounds a number up to the nearest integer.${ceil(3.2)}4
floor(value)Rounds a number down to the nearest integer.${floor(3.8)}3
exp(value)Returns Euler’s number e raised to the power of the value.${exp(1)}2.718...
log(value)Returns the natural logarithm (base e).${log(metric)}
mod(dividend, divisor)Returns the remainder after division.${mod(10, 3)}1
formatDate(date, format?)Formats a date into a human-readable string. Accepts optional format patterns.${formatDate(created_at, "YYYY-MM-DD")}
formatDuration(ms)Converts a duration in milliseconds into a human-readable string.${formatDuration(metric)}3d 4h 5m
formatPercentage(value)Formats a decimal as a percentage.${formatPercentage(metric)}75%
getVariable(name)Retrieves the value of a user-defined variable.${getVariable("Case Id")}

Tip: You can nest functions or combine them with arithmetic. For example:

${formatPercentage(round(metric / total, 2))}

This calculates a ratio, rounds it to two decimals, and formats it as a percentage.


Making the Most of Expressions

By combining metrics, attributes, operators, and functions, you can create dashboards that do more than just display numbers—they tell a story. Expressions let you build dynamic text and calculated insights that update automatically as users filter or explore data.

Whether you are showing percentages, highlighting KPIs, or formatting values for clarity, expressions help keep your dashboards informative, actionable, and visually engaging—all without custom code.

Use these tools to guide users to meaningful insights, highlight trends, and make data easier to understand. With a little creativity, your dashboards can become interactive narratives that empower better decision-making.