---
schema_version: "1"
id: 3371df60baa891602aa0f3e138ec3af420023033e7b259e798e963f0278f22e5
title: Show Subtotals on First-Level Groups in Lightning Tables
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/dashboards_tables_subtotals.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.dashboards_tables_subtotals.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1ba533c78a7a0c898716866a22941a9109f5c272f8d2ecc0f98cc9e9655c9d3b
description: Lightning tables are a powerful tool for summarizing data on a dashboard. Second-level groups automatically show subtotals for each measure column. Show subtotals to add subtotals for each measure column to first-level groups.
products:
  - Cross Cloud
release: "264"
---
# Show Subtotals on First-Level Groups in Lightning Tables

Lightning tables are a powerful tool for summarizing data on a dashboard. Second-level groups automatically show subtotals for each measure column. Show subtotals to add subtotals for each measure column to first-level groups.

### 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: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</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="d71045e79">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">To create dashboards:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">Run Reports AND Create and Customize Dashboards</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">To edit and delete dashboards that you created:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">Run Reports AND Create and Customize Dashboards</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">To edit and delete dashboards that you created in public folders:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">Edit My Dashboards</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">To edit and delete dashboards that you didn’t create in public folders:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">Manage Dashboards in Public Folders</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">To create, edit, and delete dynamic dashboards:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d71045e79 ">Manage Dynamic Dashboards</td>

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

![Edit Component window with numbered callouts indicating the Show Subtotal checkbox and a preview of the result](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-analytics-264-0-0-production-enus/295fead5-b71d-4e1c-9886-4af4d53400b6/analytics/images/rd/rd_dashboards_subtotals.png)

To show subtotals on a Lightning table, edit the widget.

1. If necessary, group data and add measure columns. To show subtotals, the table requires at least two groups.
2. Select **Show Subtotals** (1).
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-analytics-264-0-0-production-enus/295fead5-b71d-4e1c-9886-4af4d53400b6/images/icon_note.png)
    
    Note Subtotals always match the summary type of their associated metric column. If the metric column is sum of amount, the subtotal is a sum (2).
3. Click **Update**.
4. Click **Save**.

The table now features subtotals for the first-level group.

Depending on how summary formulas are applied to source report data, you can show subtotals for summary formulas that appear on Lightning table as metric columns. Here are the conditions.

- If a summary formula is applied at all levels, then subtotals can be applied.
- If a summary formula is applied to a specific group, then subtotals can be applied if the table also has the specific group. If the specific group is a second-level group, then the table must match both the source report's first-level and second-level groups. Because Lightning tables support up to two groups, summary formulas applied to third and fourth-level groups can’t be subtotaled.
    
    For example, say that a source report is grouped first by Type and then by Stage. It has a summary formula applied to Stage. The summary formula is able to be subtotaled only on Lightning tables grouped first by Type and then by Stage. If you reverse the group order in the Lightning table - grouping first by Stage and then by Type, the subtotal is "Incalculable" because the group order prevents the summary formula from running.
- If a summary formula is applied only to the grand total, then subtotals can’t be applied.