Loading
CRM Analytics
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Use a Parameter to Update a Query

          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

          Available in Salesforce Classic and Lightning Experience.
          Available with CRM Analytics, which is available for an extra cost in Enterprise, Performance, and Unlimited Editions. Also available in Developer Edition.
          User Permissions Needed
          To create a parameter: Create and Edit Analytics Dashboards
          Table with region, sum of profit, and sum of sales
          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
          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
            Note
            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
            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
          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
            Note
            Note Note: The Selection Type for the custom query must be Single selection or Single selection (required).
           
          Loading
          Salesforce Help | Article