You are here:
filter Expression Syntax
You create a filter expression in the filter transformation based on one or more dimensions in a dataset. You can use a standard filter expression or a SAQL filter expression.
- String comparisons in a filter expression are case-sensitive.
- When you filter on a Salesforce ID field extracted in an upstream sfdcDigest node, use
18-character ID values in your filter expression. sfdcDigest nodes extract 18-character
IDs, and the filter transformation performs string comparisons on ID fields.
Example:
RecordTypeId:EQ:0126A0000016QfyQAE
To use a standard filter expression, deselect the Use SAQL option in
the dataflow editor, or use the filter parameter in the
dataflow JSON. You can use these types of filter expressions.
| Filter Expression Syntax | Description |
|---|---|
| dim:EQ:value | True if the dimension and value are equal. Dataflow editor example: StageName:EQ:Closed Won Dataflow JSON example:
|
| dim:R:val0:val1 | True if the left dimension falls within the specified range between val0 and val1. Dataflow editor example: EmployeeId:R:100:1000 Dataflow JSON example: |
| dim:R:val |
Dataflow editor example: LastName:R:Li Dataflow JSON example: |
| dim:R::val | True if the dimension is less than or equal to the value based on binary sort order. Dataflow editor example: LastName:R::Levy Dataflow JSON example: |
| dim:N:val | True if the dimension and value are not equal. Dataflow editor example: RoleName:N:Manager Dataflow JSON example:
|
| dim:EQ:val1|val2 | True if the dimension equals values val1 or val2. This filter expression uses the logical OR operator ( | ). You can compare the dimension value against more than 2 values. For example, to compare against 3 values, use the following syntax: dim1:EQ:val1|val2|val3. Dataflow editor example: Lead Status:EQ:Open|Contacted Dataflow JSON example: |
| dim1:EQ:val1,dim2:EQ:val2 | True if dimension dim1 equals value val1 and dimension dim2 equals value val2. This filter expression uses the logical AND operator ( , ). You can compare more than 2 dimensions. For example, to compare 3 dimensions, use the following syntax: dim1:EQ:val1,dim2:EQ:val2,dim3:EQ:val3. Dataflow editor example: Lead Status:EQ:Qualified,Rating:EQ:Hot Dataflow JSON
example: |
To use a SAQL filter expression, select the Use SAQL option in the
dataflow editor, or use the saqlFilter parameter in the
dataflow JSON. Use the SAQL filter statement in your expression without the a = filter a by part. See
This example returns rows where the Stage Name field contains Proposal/Price Quote or Negotiation/Review.
Dataflow editor: StageName in ["Proposal/Price Quote", "Negotiation/Review"]
Dataflow JSON: "saqlFilter": "StageName in [\"Proposal/Price
Quote\", \"Negotiation/Review\"]"
\.For complete information about SAQL operators, see Analytics SAQL Developer Guide.

