---
schema_version: "1"
id: 25b6600012bafa7cb08af682abe677d23c12ff83b5beac1e24a4e37e23199c6d
title: Bind the Initial Filter Selection
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_bindings/guides/bi-dashboard-bindings-wave-designer-initial-selections.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-bindings/guide/bi-dashboard-bindings-wave-designer-initial-selections.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7ae5ee961d35538f0d761d2ce04bbea4bb7ed0cdf34dd156b6e04ba6520677af
products:
  - Analytics Interactions
  - analytics
---
# Bind the Initial Filter Selection

You can use a results interaction to dynamically set the initial selection of a query based on a characteristic of the logged-in user. For example, you can filter a region-based dashboard based on the country of the logged-in user.

- **Example**

**note:** Only `staticflex`-, `saql`-, or `soql`-type queries can use interactions for initial filter selections.

For example, to focus the dashboard on the logged-in user’s country, configure the list widget to select the country when the dashboard first opens.

!["USA" is automatically selected as the country when you first open the dashboard.](https://developer.salesforce.com/docs/media/bi_dev_guide_bindings/bi_dashboards_binding_initial_selection.png)

To implement this behavior, define a query that retrieves the logged-in user’s country from the Salesforce User object. To do this, select the list widget, navigate to the Advanced Editor in the Query section, and add the following JSON query in the Query tab.

```json
"UserData": {
    "groups": [],
    "numbers": [],
    "query": "SELECT Username, Country, FirstName, LastLoginDate
              FROM User WHERE Name = '!{user.name}'",
    "selectMode": "single",
    "strings": [
        "Username",
        "Country",
        "FirstName",
        "LastLoginDate"
    ],
    "type": "soql"
}
```

Then bind the initial selection in the list widget’s query to the logged-in user’s country. Here the binding is in the `start` attribute.

```json
"Billing_Country_2": {
      "groups": [],
      "isFacet": true,
      "label": "Billing Country",
      "numbers": [],
      "query": "q = load \"Opp_Icons\"; q = group q by 'Billing_Country'; q = foreach q generate 'Billing_Country' as 'Billing_Country', sum('Amount') as 'sum_Amount'; q = order q by 'sum_Amount' desc;",
      "selectMode": "multi",
      "start": "{{ cell(UserData.result, 0, 'Country').asObject() }}",
      "strings": [],
      "type": "saql",
      "useGlobal": true
  }
```

For more information about results interactions and bindings, visit the [Use Bindings to Compare Data](https://trailhead.salesforce.com/content/learn/projects/advanced-dashboard-techniques/use-bindings) Trailhead module.
