LogoLogo
  • Welcome to the MOOST platform user manual
  • Platform Manual
    • Login
      • Forgot Password
    • Notifications
    • Rules
      • Rule Configurator
        • Data graph
        • Datasets
        • Condition
        • Streak
        • Message
        • Settings
        • Rule Simulator
        • Early Adopter
        • Command
      • Rule Language
        • Syntax
        • Data Types
        • Data Structures
        • Functions
          • AVG
          • COUNT
          • DISTINCT
          • EVAL
          • FILTER
          • GROUP_BY_DEVICE
          • GROUP_BY_TIME
          • MAX
          • MIN
          • POSITION
          • REVERSE
          • SORT
          • SUBSET
          • SUM
        • Operations
          • Plus
          • Minus
          • Multiply
          • Divide
          • Negate
          • Less Than
          • Less or Equal
          • Equal
          • Not Equal
          • Greater or Equal
          • Greater
          • AND
          • OR
          • NOT
          • Format
          • Attribute Accessor
        • Examples
    • Events
    • Buildings
      • Household Profile
    • User Profile
    • Billing Portal
      • Payment Method
      • Update Payment Address
      • Invoices
      • Terminate Subscription
    • Context Services
      • Weather Forecast
      • Solar Production Forecast
      • Power Consumption Forecast
      • Power Generation Forecast
    • Support Center
  • Technical Integration
    • Cloud-to-Cloud Integration
      • Platform On-boarding
      • Configure Notification Settings
        • Receive Notifications
          • iOS Notification Handling
      • MOOST API Integration
        • Request Access Token
        • Synchronize Buildings and Devices
          • Device Types
        • Forward Events
          • Event Types
            • Device Status
            • Charging Modes
            • Switch State
        • Notifications and Interactions
          • Return Notification Interaction
  • Best Practices
    • FAQ
    • User Acceptance Testing
  • Policies
    • Security Policy
    • Privacy Policy
Powered by GitBook

© 2025 MOOST AG

On this page
  • Description
  • Filter(Vector<any>, Scalar<Text>, Scalar<any>)
  • Examples
  • Filter(GroupedScalar<any, any>, Scalar<Text>, Scalar<any>)
  • Examples
  • Filter(GroupedVector<any, any>, Scalar<Text>, Scalar<any>)
  • Examples
Export as PDF
  1. Platform Manual
  2. Rules
  3. Rule Language
  4. Functions

FILTER

Description

Filter data on a vector, grouped scalar or grouped vector, by comparing with a threshold. Only data which fulfills that boolean condition is kept.

Filter(Vector<any>, Scalar<Text>, Scalar<any>)

FILTER(vector: Vector<any>, 
       comparisonSymbol: Scalar<Text>, 
       threshold: Scalar<any>): Vector<any>

Filter data in the given vector by comparing with the threshold.

Parameters

Parameter
Description

vector

A vector whose data is to be filtered

comparisonSymbol

The comparison symbol. One of: <, <=, =, !=, >=, >

threshold

A scalar which is used to filter data.

Returns

Vector of same type as from the first function parameter, with filtered data.

Examples

Filter events, so that only values > 1000 are kept in the vector.

FILTER($GridPowerConsumption, '>', 1000)

Filter(GroupedScalar<any, any>, Scalar<Text>, Scalar<any>)

FILTER(groupedScalar: GroupedScalar<any, any>, 
       comparisonSymbol: Scalar<Text>, 
       threshold: Scalar<any>): GroupedScalar<any, any>

Filter data in the given grouped scalar by comparing with the threshold. Empty groups are removed from the grouped scalar.

Parameters

Parameter
Description

groupedScalar

A vector whose data is to be filtered.

comparisonSymbol

The comparison symbol. One of: <, <=, =, !=, >=, >

threshold

A scalar which is used to filter data.

Returns

Grouped scalar of same type as from the first function parameter, with filtered data.

Examples

Filter events in the grouped scalar, so that only values > 1000 are kept in the vector.

FILTER(MIN(GROUP_BY_DEVICE($PowerConsumption)), '!=', 0)

Filter(GroupedVector<any, any>, Scalar<Text>, Scalar<any>)

FILTER(groupedVector: GroupedVector<any, any>, 
       comparisonSymbol: Scalar<Text>, 
       threshold: Scalar<any>): GroupedVector<any, any>

Filter data in the given grouped vector by comparing with the threshold. Empty groups are removed from the grouped vector.

Parameters

Parameter
Description

groupedVector

A vector whose data is to be filtered.

comparisonSymbol

The comparison symbol. One of: <, <=, =, !=, >=, >

threshold

A scalar which is used to filter data.

Returns

Grouped vector of same type as from the first function parameter, with filtered data.

Examples

Filter events, so that only values > 1000 are kept in the grouped vector.

FILTER(GROUP_BY_DEVICE($PowerConsumption), '<=', 200)
PreviousEVALNextGROUP_BY_DEVICE

Last updated 1 year ago