Skip to main content
Skip table of contents

TRUE

Category: Logical functions

Overview

The TRUE function returns 1 for every defined value in the input node. Undefined intersections remain undefined in the result.

Use this function when you need a constant true flag across all defined intersections of an input node, for example as a condition in IF or to create a binary helper table.

Syntax

TRUE('Node')

Example usage: TRUE('Revenue')

Parameters

Parameter

Description

Type

Required

Node

Input node, specified using the node name in single quotes (e.g.'Revenue')

Node reference

Yes

Output Shape

Aspect

Behavior

Dimensionality

Same as input.

Values

1 for every defined intersection. Undefined intersections remain undefined (N/A).

Row count

Same as input. Only defined rows produce output.

Watch Out

  • TRUE only covers defined rows. It does not create values where the input is undefined. If you need to flag undefined rows, use IS_NA instead.

  • The input value itself does not matter. TRUE returns 1 regardless of whether the value is positive, negative, or zero. Only whether the value is defined matters.

  • TRUE accepts expressions as input (e.g. TRUE('A' + 'B')). The result reflects the dimensionality and defined intersections of the combined expression.


Examples

Returns 1 for all defined rows

This example shows TRUE returning 1 for every row that has a defined value in the input node.

Input node: Revenue

Year

Value

2025

-24.5

2026

95

2027

110

Formula: TRUE('Revenue')

Year

→ TRUE Result

2025

1

2026

1

2027

1

TRUE applied to a combined expression

This example shows TRUE applied to a sum of nodes. It returns 1 for each year where the combined expression produces a defined value.

Input node: Additional Revenue

Year

Product

Value

2025

A

95

2026

B

-56

2027

A

107

2027

B

5

Formula: TRUE('Revenue'+'Additional Revenue')

Year

→ TRUE Result

2025

1

2026

1

2027

1

The addition rolls up both nodes to their common dimensions (Year only), and TRUE returns 1 for each defined year.

Undefined values remain undefined

TRUE only produces 1 for defined values. Rows where the input is undefined remain undefined in the result.

Input node: A

Year

Revenue

2025

59

2026

2027

157

Formula: TRUE('A')

Year

→ TRUE Result

2025

1

2026

2027

1

Year 2026 has no defined value, so it does not appear in the result.


Related Functions

Function

When to use instead

FALSE

When you need 0 for every defined value instead of 1.

IS_NA

When you need to detect undefined values rather than marking already defined intersections as true.

JavaScript errors detected

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

If this problem persists, please contact our support.