---
schema_version: "1"
id: b5658148bdeaec033d933156f4f9bd4af6c1831fc3bcd8fa52c5a0c206dbe27f
title: Edit a Query
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_dashboards_steps_edit.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_dashboards_steps_edit.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6a1cb4d84f918fc51104abce26c337daa8f452f41389904d2ab3578d57bbf32d
description: When you edit a query, you can change the details, like the query label. These changes affect all widgets that use the query. You can also change the visualization properties, like chart type. Depending on the method that you use to edit the query, CRM Analytics handles visualization changes differently.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Edit a Query

When you edit a query, you can change the details, like the query label. These changes affect all widgets that use the query. You can also change the visualization properties, like chart type. Depending on the method that you use to edit the query, CRM Analytics handles visualization changes differently.

You can use the following methods to change a query.

| Method | Handling Visualization Changes |
| --- | --- |
| Edit the query from the query panel | CRM Analytics saves the visualization changes in the query, but doesn’t apply them to existing widgets that use the query. |
| Double-click the widget | CRM Analytics saves the visualization changes in the query and applies them to the widget. CRM Analytics doesn’t apply them to other widgets that use the query. |

![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 CRM Analytics automatically loads queries on the opened page. Click other pages to load more queries, or click **Start** to load a specific query.

![Selecting a dashboard page and starting a query](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_steps_edit.png)

Consider the following limitations before editing a query.

- You can edit only queries with types `aggregate`, `aggregateflex`, `saql`, and `grain`. If you edit an `aggregate` or `aggregateflex` that contains a SAQL query in the `pigql` JSON attribute, CRM Analytics converts the query type to `saql`.
- You can’t edit a query that’s used in a global filter widget created before Winter ’18.
- You can edit a `saql` type query that contains interactions(bindings) to switch modes (Chart, Table, Query) or modify the query. You’re not able to switch modes or modify a query for an `aggregateflex` type that contains interactions. However, you can change the format, such as adding conditional formatting.

1. Open the dashboard in edit mode.
2. Use one of the following methods to edit the query.
    
    1. To edit the query from the queries panel, hover over the query, click the down arrow, and then click **Edit** in the query actions menu.
        
        ![Edit button in the step actions menu of the steps panel.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_step_edit_steps_panel.png)
    
    1. Double-click the widget in the dashboard.
        
        You can also select the widget and click ![Edit Step button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_edit_step_inWidgetActionsMenu.png) in the widget actions menu.
        
        ![The widget actions menu appears when you select a widget while editing a dashboard.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_widget_actions_edit_step.png)
3. Make your changes.
    
    You can change the following details:
    
    - Query label (1)
    - Query (2)
    - Visualization properties and formatting (3)
    - Chart, table, and SAQL mode (4)
    
    ![You can change the step and widget details in the explorer.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboards_step_edit_areas.png)
4. Click **Update**.
5. To save your changes, save the dashboard.

- **[Considerations When Converting Query Types](https://help.salesforce.com/s/articleView?id=analytics.bi_step_conversion_to_saql.htm&release=264.0.0&type=5)**  
    CRM Analytics treats query types differently. Before you convert an `aggregate` or `aggregateflex` query type to `saql`, review the following implications.