---
schema_version: "1"
id: 242999117df22b5664bbed02daeb2372f7ba95605d60ed060058fa0a2abc797b
title: Project the Same Query Results Differently in Charts and Tables
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_dashboard_widgets_projection_flex.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_widgets_projection_flex.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a9fde108d892416f6915a33675e58ba3262c390aed59ae489d2a518b9ad3e95e
description: 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.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# 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.](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_expected_amount_step.png)

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.](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_chart_all_measures.png)

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.](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_hide_field.png)

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.](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_show_hide_fields.png)

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](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 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.

#### See Also

- [Add Chart Widgets to Visualize Data](https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_widgets_chart_add_flex.htm&release=264.0.0&type=5 "Charts in a CRM Analytics dashboard allow you to visually summarize and trend your data. For example, a donut chart can show the distribution of opportunities across industry type.")
- [Add a Table Widget to Show Record Details and Create Calculated Columns](https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_widgets_table_add_flex.htm&release=264.0.0&type=5 "You can add different types of tables to a CRM Analytics dashboard. To view record-level details, add a values table. A values table can show details like how long a case has been open and who owns it. To create custom columns in a table based on calculations from existing fields, add a compare table. If the underlying query contains at least one grouping, you can create a pivot table.")