Loading
Ongoing maintenance for Salesforce HelpRead More
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
          Create a Custom Query with User-Defined Values

          Create a Custom Query with User-Defined Values

          Use custom queries to apply user-defined values to dimensions, measures, and limits of other queries. For example, you can create a toggle widget that filters case records based on the following user-defined values: High Priority Cases, Medium Priority Cases, and Low Priority Cases. To enable these custom values to filter your data, you map them to your data using a binding.

          The dashboard contains a toggle widget with the following options: High Priority Cases, Medium Priority Cases, and Low Priority Cases.

          1. To open the queries panel, click an empty space in the dashboard canvas in the dashboard designer.
            The steps panel shows the steps defined in the dashboard.
          2. Click Create Query.
            The Select a Dataset screen shows a list of all fields in the dataset.
          3. Click Create Custom Query.
            You can add custom values to the step in this modal.
          4. Click pencil icon for editing to change the query label.
            CRM Analytics creates the query ID from the label. After you create the query, you can’t change the query ID. CRM Analytics refers to queries by their ID so dashboards don’t break if you change the labels.
            Add a dataset modal for measure or dimensions.
          5. Click +Add Column to add a dimension, measure, text, or number as a column to your custom query.
            1. For a dimension or measure, choose a dataset.
            Choose a field modall for measure or dimensions.
          6. Click +Add to add rows to your custom query.
            1. For a measure, choose a function. For a dimension or measure, choose a field.
              Note
              Note Each measure column in a custom query creates two values in the JSON. One value for the function (sum, average, etc.) and one for the selected measure field. Use both values when creating a compact-form binding on a measure.
              Add 2 extra columns for SAQL bindings to work
          7. Add up to 20 columns and click Done.
            Note
            Note To create SAQL bindings, your custom query requires two additional text columns. One column determines the value of the field and the other column is for the field label.
            CRM Analytics adds the query to the query panel, making it available for use by other widgets in the dashboard.
          8. To make changes, find the query in the query panel, click pencil icon for editing, then Edit.
            You can change the query name, add and remove columns, add row and column values, reorder columns, and pick values from a dataset.
            Note
            Note To use a custom query for linking, make the column the first column in the dialog.
          9. To apply this custom query to a list or toggle widget:
            1. Drag the list or toggle widget from the widget toolbar to the dashboard canvas.
            2. Drag the custom query on top of the widget.
              The widget shows the custom display values as selection options.
            3. To change the widget and query properties, select the widget.

              The Widget panel groups the widget properties into sections. So that you don’t accidentally overlook any properties, expand any collapsed sections.

            4. To customize the appearance of the widget, set the widget properties.
            5. To preview your changes to the dashboard, click Preview button.
            6. Save the dashboard.

          If you applied the custom query to a list or toggle widget, you can see the widget in the dashboard. To specify how a selection in this query affects other widgets, bind the values of the custom query to other widgets. For example, create a binding that filters the other widgets based on a value in the list or toggle widget. For more information about binding queries, see the CRM Analytics Interactions Developer Guide .

           
          Loading
          Salesforce Help | Article