---
schema_version: "1"
id: 2011c71474f9caa1d98bd1f93b6e57929ceb90eceee133011947e1a2adcc3d3b
title: Explore Multiple Datasets with a Single Query
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_explorer_data_blending.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_explorer_data_blending.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 40837ccda44353cacf8c0294b8d7c831eabc2729a19f7415e9bb2dfdcb71a520
description: Answers to business questions sometimes require context beyond the current dataset. Or, your dataset structure may not match the way you want to explore your data. To surface insights that require data from disparate datasets, blend the data from multiple datasets in a lens. Then query the blended data just as you would with a single dataset.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Explore Multiple Datasets with a Single Query

Answers to business questions sometimes require context beyond the current dataset. Or, your dataset structure may not match the way you want to explore your data. To surface insights that require data from disparate datasets, blend the data from multiple datasets in a lens. Then query the blended data just as you would with a single dataset.

Data blending differs from a join operation in that data blending affects only the data visualization. With data blending, you can reveal relationships across multiple datasets without altering the datasets.

For example, suppose that you want to see how sales for different product subcategories are doing relative to their targets. Here's how you create a side-by-side comparison of product subcategory totals from the SuperStoreSales and SuperStoreTarget datasets.

1. In CRM Analytics, open a lens for the primary SuperStoreSales dataset.
2. Click **Add Dataset**.
    
    ![Shows the link to add a dataset.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_data_blending_add_dataset.png)
3. Add SuperStoreTarget as the secondary dataset.
    
    The lens now includes data from both datasets. By default, the data is combined using a left blend. All data from the primary dataset is included along with the data from the secondary dataset that matches the primary dataset.
    
    To extend your exploration further, add more datasets. You can query up to four datasets in a single exploration.
4. To change the blend type:
    
    1. Click **Edit** in the Datasets area.
    2. Select the blend type.
    3. Click **Done**.
    
    ![Shows the choice of blend: left, right, inner, or outer.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_data_blending_choose_blend_type.png)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)
    
    Note When a blend has more than 2 datasets, the same blend type is applied to all the datasets.
5. To create a meaningful side-by-side comparison, select measures and the field to group by from each dataset.
    
    When defining groups, measures, and filters, select fields from any of the blended datasets. This example includes Sum of Sales for the SuperStoreSales dataset and Sum of Target for the SuperStoreTarget dataset. To group by product subcategories, select Product\_Sub\_Category for each of the datasets.
    
    ![Shows how to add measures and groups.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_data_blending_add_measure_group.png)
    
    The query result shows the relationship between Sum of Sales and Sum of Target for each product subcategory.
    
    ![Displays a side-by-side comparison of Sum of Sales and Sum of Target.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_data_blending_result.png)

Limitations:

- You can blend up to six datasets.
- Add all datasets before beginning to explore them. The **Add Dataset** control is disabled when you add groupings, measures, or filters.
- You can add a dataset only once.
- These features aren't available: drill and focus, values table, windowing and timeseries functions, totals and subtotals, and Natural Language Queries (NLQ).
- Faceting applies only to the primary dataset when you blend data from multiple datasets.
- Record-level actions work only with the primary dataset.