Loading
Scheduled 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
          Project the Same Query Results Differently in Charts and Tables

          Project the Same Query Results Differently in Charts and Tables

          If charts and tables use the same query, each widget can show a different set of fields from the query results. You can also specify a different field order for each widget. For example, to change the measure that appears on each axis in a scatter plot, reorder the measures for that widget.

          If charts and tables use the same query, each widget can show a different set of fields from the query results. You can also specify a different field order for each widget. For example, to change the measure that appears on each axis in a scatter plot, reorder the measures for that widget.

          The following compare table query shows multiple measures grouped by a dimension. The Expected Amount measure is calculated based on the other two measures: Amount * Probability.

          The step has three measures (Sum of Amount, Max of Probability, and Expected Amount) and one grouping.

          The following compare table query shows multiple measures grouped by a dimension. The Expected Amount measure is calculated based on the other two measures: Amount * Probability.

          The chart shows 3 bar graphs, one for each measure and all grouped by opportunity name.

          To show only the Expected Amount and Name fields for this widget, edit the widget and then select Hide for the other measures. (To show a hidden field, select Show. To reorder a field, select Move Up or Move Down.)

          The menu for the Sum of Amount measure includes Move Up, Move Down, and Hide options.

          The following example shows two charts based on the same query. The second chart shows the effect of hiding the other two measures.

          The Show Fields chart shows a separate graph for each measure. The Hide Fields chart shows one graph for the Expected Amount measure.

          The Show and Hide options are only available for aggregateflex (for compare tables) and saql query types. To show or hide fields for tables or charts based on other query types, configure the widget properties in the dashboard JSON. Add a “columns” attribute and specify the API names of the fields that you want to appear in the widget.

          "chart_2": { 
              "parameters": { 
                  "columns": [ "Name", "C" ], 
                  "visualizationType": "hbar", 
                  "step": "Amount_Prob_1", 
                  ... 
              }, 
              "type": "chart", 
              ... 
          }

          Consider the following guidelines when configuring the “columns” JSON property.

          • If fields are listed in "columns" and you add a measure or grouping to the query, the new field doesn’t appear in the widget until you add it to “columns.”
          • If "columns" isn’t specified in the widget properties or is set to an empty array, the widget shows all fields available in the query results.
          • CRM Analytics ignores fields specified in “columns” that don’t exist in the query. If none of the fields in “columns” exist in the query, the widget doesn’t show any fields.
          • The order in which you specify fields in “columns” is the order in which they appear in the widget.

          For charts and tables that use the same query, keep these behaviors in mind.

          • If a chart widget’s underlying query returns multiple rows for the same grouping value, the chart only displays the first record for each unique grouping value and ignores the rest. As a workaround, customize the query in SAQL form.
          • In a lens or dashboard, when you hide one of the groups of a chart with multiple groupings, the chart is no longer grouped by the hidden field.
          Note
          Note There are two ways to show, hide, or reorder columns. Do it by editing the query or editing the widget. If you perform these actions at the query level, your changes impact all widgets that use the query and can break widgets that use the query. For example, a widget breaks if you hide a required measure.
           
          Loading
          Salesforce Help | Article