---
schema_version: "1"
id: 1395c8be286f1bff681adeab594737e5c021af733b581a70278f923e7d150e07
title: Create Deeper Dependencies with Nested Interactions
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-nested.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-bindings/guide/bi-dashboard-bindings-wave-designer-nested.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9ee242e4002c814341bcd54cf903ec4cc722206cfc3de4b0fde238bcd9b91c75
products:
  - Analytics Interactions
  - analytics
---
# Create Deeper Dependencies with Nested Interactions

With nested interactions, you can create deeper dependencies among widgets.

**Example**

For example, this pie chart shows the number of opportunities for each segment. It filters the results based on the selected grouping in the toggle widget and selected value from that grouping in the horizontal bar chart.

![The dashboard shows a toggle with static values: Owner, Country, and Industry. It also contains a bar chart that shows sum of amount, grouped by industry, and a donut chart that shows count of rows, grouped by segment.](https://developer.salesforce.com/docs/media/bi_dev_guide_bindings/bi_dashboards_charts_nested_bindings.png)

The pie chart can filter results based on the value of the selected grouping because it contains a nested interaction.

**note:** This example shows a nested interaction using column groupings. For an example of grouping with cells, see [Data Selection Functions](https://developer.salesforce.com/docs/analytics/bi-dev-guide-bindings/guide/bi-dashboard-bindings-functions-wave-designer-data-selection.md).

```sql
q = load \"Opportunities1\";
q = filter q by {{column(RevenueDynamicGrouping.selection,
                  column(StaticGroupingNames.selection,
                  [\\"value"])).asEquality(
                      cell(StaticGroupingNames.selection,
                      0,
                      "value"))
                }};
q = group q by 'Segment';
q = foreach q generate 'Segment' as 'Segment', count() as 'count';
q = order q by 'Segment' asc;\nq = limit q 200;
```

**note:** If you bind a measure or grouping in a query used for a chart, you must also replace the `columnMap` section in the widget-level chart JSON with an empty `columns` array. For more information, see [Measure Interactions](https://developer.salesforce.com/docs/analytics/bi-dev-guide-bindings/guide/bi-dashboard-bindings-wave-designer-use-case-measure.md) and [Group Interactions](https://developer.salesforce.com/docs/analytics/bi-dev-guide-bindings/guide/bi-dashboard-bindings-wave-designer-use-case-group.md).
