Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use constants in formula expressions

Focus mode
Use constants in formula expressions - AWS IoT SiteWise

In AWS IoT SiteWise, you can use constants in your expressions and formulas to represent fixed values or predefined parameters. Constants can be used in various contexts, such as data transformations, alarm conditions, or visualization calculations. By using constants, you can simplify your expressions and make them more readable and maintainable.

You can use the following common mathematical constants in your expressions. All constants are case insensitive.

Note

If you define a variable with the same name as a constant, the variable overrides the constant.

Constant Description

pi

The number pi (π): 3.141592653589793

e

The number e: 2.718281828459045

true

Equivalent to the number 1. In AWS IoT SiteWise, Booleans convert to their number equivalents.

false

Equivalent to the number 0. In AWS IoT SiteWise, Booleans convert to their number equivalents.

none

Equivalent to no value. You can use this constant to output nothing as the result of a conditional expression.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.