Returns just those rows of a table that meet a condition. In CALCULATE it handles conditions too complex for a Boolean filter argument, though a Boolean filter is faster whenever one will work.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains FILTER in context, with comparison tables and the common traps.
Terms in this definition
- RETURNS
States what a function gives back, as a type or a table, inside
CREATE FUNCTION. SQL functions can leave it out and have the type worked out from their body. - Event
Table in Log Analytics where entries from Windows event logs are kept.
- CALCULATE
A DAX function that computes an expression after changing the filter context with filter modifiers, Boolean filters or table filters. Called with no filters, it still turns any row context into filter context, which is known as context transition.
Related terms
- ABAC
An access-control approach in Unity Catalog where governed tags determine what a policy covers. A single policy set on a metastore, catalog, schema or table can therefore filter rows, mask columns, or grant or deny access across many objects at once.
- AH
Short for Authentication Header, an IPsec protocol that verifies the sender and integrity of an entire IP packet but leaves it unencrypted. Network security group rules can filter on it, as they can on TCP, UDP, ICMP and ESP.
- ALLEXCEPT
Clears every context filter from a table except the ones placed on columns you list. In this DAX function, the first argument must be a base table and the rest must be columns belonging to it.
- Anti-malware policy
Scans mail attachments for malware as part of Exchange Online Protection, sending anything infected to quarantine. The common attachments filter may reject chosen file types, and you can add custom policies for particular users, groups or domains on top of the default.
- Anti-spam policy
Exchange Online Protection uses this policy to filter junk both arriving and leaving. Every cloud recipient falls under the default; custom versions can aim at users, groups or domains. Among the possible verdict actions is quarantine, held for between 1 and 30 days.
- AzureFrontDoor.Backend
Service tag for the IP addresses Front Door uses when contacting origins. Pairing it with a filter on the X-Azure-FDID header in an access restriction ensures only your own Front Door instance gets through.
- Blob index tags
Indexed, searchable key-value attributes set on blobs, which lifecycle rules can filter on via
blobIndexMatchand ABAC conditions can use; filtering by them isn't possible with a SAS. - Boolean filter expression
A true/false condition such as
'Product'[Color] = "Blue"passed as a filter to CALCULATE or CALCULATETABLE. Only one table's columns may appear in it, measures and nested CALCULATE calls are not allowed, and it overrides an existing filter on that column unless you wrap it in KEEPFILTERS.