Skip to main content
Skip table of contents

LEVELFILTER

Basic Overview

Description

Filters the input to rows where a certain condition is met between level values of two compared levels.

Signature

LEVELFILTER('Node', “Level1”, “Level2” [, “Operation” [, “CaseSensitive”]])

Parameters

  • Node: The input node with the values to be filter.

  • Level1: The first levels for which level values are to be compared.

  • Level2: The second level for which level values are to be compared.

  • Operation: The filtering condition. Supported operations are:

    • EQ: Only returns rows where values of Level1 and Level2 are equal. (default).

    • NEQ: Only returns rows where values of Level1 and Level2 are different.

    • STARTSWITH: Only returns rows where values of Level1 starts with the values of Level2.

    • ENDSWITH: Only returns rows where values of Level1 ends with the values of Level2.

    • CONTAINS: Returns rows where values of Level1 contains the values of Level2.

  • CaseSensitive: Whether the perform level value check in a case sensitive manner or not. Supported values are:

    • TRUE: Performs the check taking upper/lower case letters into account. (default)

    • FALSE: Performs the check without taking upper/lower case letters into account.

Limitations/Notes

  • Node must contain both Level1 and Level2 to perform the filtering.

  • Compare levels Level1 and Level2 cannot be the same as each other.

  • For the operations STARTSWITH, ENDSWITH, and CONTAINS the checks are performed based on first compare level (Level1). Meaning the filtering is made according to “does a level value of Level1 starts with a value of Level2?“ and not the other way around.

  • For the operations STARTSWITH, ENDSWITH, and CONTAINS equal level values will return true values.

  • The default operation is EQ if not specified.

  • The default case sensitive value is TRUE if not specified.

Examples

The input node contains levels Year, Product, and OtherProduct.

Input node = 

Year

Product

Other Product

Value

2021

Car

Car

10

2022

Truck

Plane

20

2023

Bicycle

bicycle

30

2024

Van

Truck

40

  1. LEVELFILTER('Input node', “Product“, “Other Product“, “EQ“, “FALSE“) would produce:

Year

Product

Other Product

Value

2021

Car

Car

10

2023

Bicycle

bicycle

30

In this example only rows with same level values between “Product” and “Other Product“ are kept. Note that the row with “bicycle” is only kept because the operation is not performed case sensitive.

  1. However, performing the same operation case sensitive e.g.

LEVELFILTER('Input node', “Product“, “Other Product“, “EQ“, “TRUE“) would produce:

Year

Product

Other Product

Value

2021

Car

Car

10

  1. LEVELFILTER('Input node', “Product“, “Other Product“, “NEQ“, “FALSE“) would produce:

Year

Product

Other Product

Value

2022

Truck

Plane

20

2024

Van

Truck

40

Not equals operation only kept the rows where the values of “Product” and “Other Product” differ.

  1. Similarly, case sensitive version e.g.

LEVELFILTER('Input node', “Product“, “Other Product“, “NEQ“, “TRUE“) would produce:

Year

Product

Other Product

Value

2022

Truck

Plane

20

2023

Bicycle

bicycle

30

2024

Van

Truck

40

Other examples with different operation types

Input node = 

Year

Filter Year

Value

2021

20

10

2022

202

20

2023

02

30

2024

24

40

  1. LEVELFILTER('Input node', “Year“, “Filter Year“, “STARTSWITH“) would produce:

Year

Filter Year

Value

2021

20

10

2022

202

20

In this example, only the rows with level values of “Year” which start with the level values of “Filter Year” is kept in the result. (2021, 2022)

  1. LEVELFILTER('Input node', “Year“, “Filter Year“, “ENDSWITH“) would produce:

Year

Filter Year

Value

2024

24

40

In this example, only the rows with level values of “Year” which ends with the level values of “Filter Year” is kept in the result. (2024)

  1. LEVELFILTER('Input node', “Year“, “Filter Year“, “CONTAINS“) would produce:

Year

Filter Year

Value

2021

20

10

2022

202

20

2023

02

30

2024

24

40

In this example, all the rows are kept since each row's Year value contains the value in Filter Year. (2021, 2022, 2023, 2024)

JavaScript errors detected

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

If this problem persists, please contact our support.