---
title: "Using Groups"
description: "Groups are sets of variables within sections. You can also create nested groups simply by creating a group under an existing group."
source_url: https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-edit-variables/using-groups
language: en
last_updated: 2023-08-16
---
# Using Groups

## Overview

Groups are sets of variables within sections. You can also create nested groups simply by creating a group under an existing group.

## Creating a Group

Groups can be created as follows:

{% stepper %}
{% stepper-step %}
Hold down the **CTRL** key and select the elements to be included in the new group.
{% /stepper-step %}
{% stepper-step %}
Press **CTRL+G** or choose **Group Variables** in the context menu.

Grouping variables

{% /stepper-step %}
{% stepper-step %}
Enter a name for the new group.

{% /stepper-step %}
{% /stepper %}
Aside from visual organisation in the spreadsheet, groups can also be used for:

## Easily Adding Totals in the Spreadsheet and on Tables

- These totals will automatically stay up to date as new variables are added, or existing variables are removed, from the group/section.
- **In the spreadsheet**: hit the sum icon at the top of the group/section row (see [Using Sections](https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-edit-variables/using-sections.md)).
- **On tables**: add a group/section as a series to add its variables as well as a total row (see [Using Sections](https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-edit-variables/using-sections.md)).

## Using Groups in Functions (Within Formulas)

Easily sum (or avg/min/max...) the variables within the group. Just type `sum(Group Name)` and xP&A will sum all the variables within that group. When variables are added to (or removed from) the group, the function (e.g. sum) will auto-update.

## Keeping Variables on Tables in Sync With the Spreadsheet

If you add a Group to a table (as opposed to the individual variables), then the table will automatically stay up to date as variables are added/removed from the group in the spreadsheet (see [Using Sections](https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-edit-variables/using-sections.md)).

## Table Headers

Organise variables under Group name headers on tables. You can toggle this setting off under **Display | Show group headers**.

Display settings for table headers
