FILTER Function
Description:
The Filter function is used to return a subset table of an expression or a table.
Return Value:
Filter returns a table containing only the filtered rows.
Syntax:
FILTER( <Table> , <FilterExpression> )
- Description of the parameters:
PARAMETER |
DESCRIPTION |
Table |
Table or expression table to be filtered. |
FilterExpression |
A boolean expression that is to be evaluated for each row of the table. |
Example:
In our data model, we have a Product table which contains the unit price of each product, we want to add a new Product table where the unit price of products is greater than $1000.
To add the new table, we will use the formula below:
New_Product = FILTER('Product', 'Product'[UnitPrice] > 1000)
Note that FILTER function is generally used as a function that is embedded in other functions that require a table as an argument.
Related Video: