Description
The FILTER function returns a subset of values from a specified attribute that meet a given filter condition. It cannot be used as a standalone function within a calculation attribute and must be paired with another function.
Usage
The function is used to extract values from an attribute based on specified conditions.
Syntax:FILTER(attribute to be returned, filter_condition)
Examples
-
Filter and Return Latest Scores:
LATEST(FILTER(#[Risk Assessment].[Assessment Score], #[Risk Assessment].[State] = "Complete"))Returns the Assessment Score values from the latest linked Risk Assessment record, where the State is "Complete."
-
Count Unique Records Where Risk Appetite is Not Met:
COUNTU(FILTER(#[Risk Assessment].[ID], #[Risk Assessment].[Risk Appetite Met] = "No"))Counts the number of unique ID values from linked Risk Assessment records where the Risk Appetite Met is "No."
Inputs
| Argument | Data Type | Description |
|---|---|---|
| attribute | Any | The attribute from which values are to be returned. |
| filter_condition | Boolean | The condition that must be met for values to be included. |
Returns
Type: Array
- Produces a subset of values meeting the specified filter condition.