---
schema_version: "1"
id: 84a6f510de04524566ca5595bbb0ffdbacd9b9e6d89af22e9b6e57650a150b84
title: Use a Parameter to Update a Query
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_dashboard_components_parameters_use_case.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_components_parameters_use_case.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d5601ebadcf481f0dd948fbb25525322063e4aca570c3ffdf5c4a0e33902b150
description: In this example dashboard stakeholders want the flexibility to add filter values and fields to a single column in a table. This type of request can be complicated because it requires passing data to a portion of a query. However, you can insert a parameter into the column filter to be updated with desired values and fields. The parameter can be set up to work as a static or a dynamic value type.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Use a Parameter to Update a Query

In this example dashboard stakeholders want the flexibility to add filter values and fields to a single column in a table. This type of request can be complicated because it requires passing data to a portion of a query. However, you can insert a parameter into the column filter to be updated with desired values and fields. The parameter can be set up to work as a static or a dynamic value type.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in Salesforce Classic and Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with CRM Analytics, which is available for an extra cost in <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions. Also available in <strong>Developer</strong> Edition.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d46831e70">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d46831e70 ">To create a parameter:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d46831e70 ">Create and Edit Analytics Dashboards</td>

          </tr>
        </tbody>
      </table>

![Table with region, sum of profit, and sum of sales](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_components_parameters_uc.png)

1. Create a query with at least two measures (columns) and one grouping in the component.
2. Add a filter to the column to be filtered.
    
    ![Adding a filter to sum of sales](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_components_parameters_uc_2.png)
3. Switch the query to Query Mode and click **Done**.
4. Add the query to a Table widget in the component.
5. Select the query in the component and click Advanced Editor.
6. Create a parameter and add a default filter field and value the component query can process, such as ‘Product\_Category’==”Furniture”.
7. Click the **Query** tab and replace the existing filter in the SAQL statement with the parameter.
    
    ![Replacing the filter clause with a parameter](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_components_parameters_uc_3.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 Make sure there are no escape (‘\\’) symbols in the parameter default value.
8. Save your changes and the component.
9. Edit the dashboard the component is embedded in.
10. Click the updated component widget and click the **Parameters** tab.
11. Click the parameter you created and select **Static** from the Value Type dropdown menu.
12. Add your desired filter condition by typing in a filter field and filter value in the text box.
13. Click **Update**.
    
    Data from the parameter now powers the filter portion of the query. Notice the parameter is filtering only the Sum of Sales column.
    
    ![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 The filter field and value must exist in the component query otherwise no results appear.
    
    The parameter can also be set up as a dynamic value type to accept commonly used filter conditions to update the column.
14. Add a filter widget to the dashboard.
15. Create a custom query. Add display values along with its corresponding filter fields and values.
    
    ![Creating a custom filter with values for California, New York, Furniture, and Consumer](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_components_parameters_uc_5.png)
16. Repeat steps 1 through 10 to set up the table and parameter.
17. Click the parameter and select **Dynamic** from the Value Type dropdown menu.
18. Click **Choose Query** and select the custom filter query.
19. Select the column that lists the filter fields and values from the New Value menu.
20. Select an interaction type then click **Update**.
    
    The filter selections now update the Sum of Sales column.
    
    ![Custom filter is updating a component table](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_dashboard_components_parameters_uc_6.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 Note: The Selection Type for the custom query must be Single selection or Single selection (required).

#### See Also

- [CRM Analytics Dashboard JSON Overview](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-intro.html)