DAX - FILTER function



Description

Returns a table that represents a subset of another table or expression.

Syntax

FILTER (<table>, <filter>) 

Parameters

Sr.No. Parameter & Description
1

table

The table to be filtered. The table can also be an expression that results in a table.

2

filter

A Boolean expression that is to be evaluated for each row of the table.

Return Value

A table containing only the filtered rows.

Remarks

You can use DAX FILTER function to reduce the number of rows in the table that you are working with, and use only specific data in calculations.

DAX FILTER function is not used independently, but as a function that is embedded in other functions that require a table as an argument.

Example

Medal Count Summer Sports:= COUNTAX ( 
   FILTER (Results, Results[Season] = "Summer"), Results[Medal]
) 
dax_functions_filter.htm
Advertisements