---
schema_version: "1"
id: 3816f4f31b77192e390606d91ab4c0fba27402eb2969e827d07d4cf22742a93e
title: Predicate Expression Syntax for Datasets
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_security_datasets_predicate_syntax.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_syntax.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ed3f419ca5f30078ca5484d7f0574f54d59acc0919dd5d02e75e816ddfdb21d8
description: You must use valid syntax when defining the predicate expression.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Predicate Expression Syntax for Datasets

You must use valid syntax when defining the predicate expression.

The predicate expression must have the following syntax:

`<dataset column> <operator> <value>`

For example, you can define the following predicate expression for a dataset:

```
'UserId' == "$User.Id"
```

You can create more complex predicate expressions such as:

```
(‘Expected_Revenue’ > 4000 || ‘Stage Name’ == "Closed Won") && ‘isDeleted’ != "False"
```

Consider the following requirements for the predicate expression:

- The expression is case-sensitive.
- The expression cannot exceed 5,000 characters.
- There must be at least one space between the dataset column and the operator, between the operator and the value, and before and after logical operators. This expression is not valid: `‘Revenue’>100`. It must have spaces like this: `‘Revenue’ > 100`.

If you try to apply a predicate to a dataset and the predicate is not valid, an error appears when any user tries to query the dataset.

- **[Dataset Columns in a Predicate Expression](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_datasetcolumns.htm&release=264.0.0&type=5)**  
    You include at least one dataset column as part of the predicate expression.
- **[Values in a Predicate Expression](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_values.htm&release=264.0.0&type=5)**  
    The value in the predicate expression can be a string literal or number literal. It can also be a field value from the User object in Salesforce.
- **[Escape Sequences](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_escapesequences.htm&release=264.0.0&type=5)**  
    You can use the backslash character (\\) to escape characters in column names and string values in a predicate expression.
- **[Character Set Support](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_charactersupport.htm&release=264.0.0&type=5)**  
    CRM Analytics supports UTF-8 characters in dataset column names and values in a predicate expression.
- **[Special Characters](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_specialcharacters.htm&release=264.0.0&type=5)**  
    Certain characters have a special meaning in CRM Analytics.
- **[Operators](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_operators.htm&release=264.0.0&type=5)**  
    You can use comparison operators and logical operators in predicate expressions.
- **[Sample Predicate Expressions for Datasets](https://help.salesforce.com/s/articleView?id=analytics.bi_security_datasets_predicate_sampleexpressions.htm&release=264.0.0&type=5)**  
    Review the samples to see how to structure a predicate expression.