---
title: "Column group calculation with Native Table Enhancer [Beta] macro"
canonical: "https://support.appfire.com/space/TBL/3567878145/Column%20group%20calculation%20with%20Native%20Table%20Enhancer%20%5BBeta%5D%20macro"
format: markdown
---
> Macro (aura-html)

The Native Table Enhancer macro enables you to perform column calculations and display summarized values at each level of the nested group.

> ⚠️ The Native Table Enhancer macro is currently in beta. <u>[Learn more](https://appfire.atlassian.net/wiki/spaces/TBL/pages/3520037211)</u>.

## Group calculation overview

Group calculation supports the following calculation types: Sum, Average, Minimum, Maximum, Count, and Distinct. For each group, the macro calculates a summarized value from its nested groups and displays it in each grouped row.

- To apply group calculation, you must first group the required columns. Refer to [Group columns with Native Table Enhancer macro](https://appfire.atlassian.net/wiki/spaces/TBL/pages/3559129118).
- You can configure only one group calculation type for each ungrouped column.
- For grouped columns, only column-level calculations apply.
- You can configure group calculations only in macro setup mode. You cannot change it in Confluence page view mode.
- The macro displays the configured values in the Confluence page view mode.


## Manage group calculations

> Macro (refined-tabs)
> 
> > Macro (refined-tab)
> 
> You can perform the following group calculations.
> 
> | **Type** | **Description** | **Column type** | **Indicator on the Confluence page** |
> | --- | --- | --- | --- |
> | None | Disables the group calculation: no value is displayed for the column | Any | Not applicable |
> | Sum | Calculates the total of all values in the column | Numeric | Sum |
> | Average | Calculates the average of all values in the column | Numeric | Avg |
> | Minimum | Returns the lowest numerical value in the column | Numeric | Min |
> | Maximum | Returns the highest numerical value in the column | Numeric | Max |
> | Count | Counts the total number of non-empty cells in the column | Numeric, String, Date | Cnt |
> | Distinct | Counts unique values only, ignoring duplicates and empty cells | Numeric, String, Date | Disct |
> 
> 
> > Macro (refined-tab)
> 
> Follow the steps to configure group calculation for any column.
> 
> > 📝 You need edit permissions to access the macro setup mode.
> 
> 1. Edit the macro to open setup mode. Refer to [Set up the Native Table Enhancer macro features](https://appfire.atlassian.net/wiki/spaces/TBL/pages/3568173057).   
> Each column displays an *Edit column *(  ) option.
> 2. To set up the group calculation for any column, navigate to **Edit column** > **Edit group calculation**.
> 3. For example, to apply group calculation to the **Unit Price** column at the **Category** level:
>   1. First, group the **Category** column. To start grouping, click **Enable grouping**, then hover over the Category column header, and click the grouping icon to group table data by that column. For more information, refer to [Group columns with Native Table Enhancer macro](https://appfire.atlassian.net/wiki/spaces/TBL/pages/3559129118).
>   2. Then, navigate to column **Unit Price** > **Edit column** > **Edit group calculation** and select **Average**.
>   3. The macro calculates the average of product rows within each group and displays the result on each category group row.
>   4. You can further apply grouping on the required columns and nest groups. The average unit price rolls up and displays at all group levels.
>   5. You can configure group calculation for multiple columns. For example, applying **Minimum** to the **Stock Qty** column displays the minimum stock quantity at all group levels.
> 
> > ℹ️ - Group calculation does not affect the configured column-level calculation type. For example, if you set **Maximum** as the column-level calculation for Unit Price and **Minimum** for Stock Qty, these values remain unchanged when you apply or remove group calculation.
> 
> 
> > Macro (refined-tab)
> 
> 1. To disable group calculation for any column, navigate to **Edit column** > **Edit group calculation **and select **None.**
>   - For example, to disable the group calculation for the **Stock Qty** column:
>     - Click the **Stock Qty** Edit column. The **Edit group calculation** dialog opens.
>     - Select **None**, and click **Save**.
> 2. To disable group calculation for all columns in the table, edit the macro and click **Disable grouping** ( ).