> For the complete documentation index, see [llms.txt](https://smartbooks.gitbook.io/smartbooks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smartbooks.gitbook.io/smartbooks-docs/data-models/modules/creating-and-editing-subaccount-tables.md).

# Creating and editing Subaccount Tables

Within a module, you can create global metrics that are accessible in every formula within the module, as well as subaccount tables for building data models. You can add multiple subaccount tables to a single module to tailor the system to your specific needs.

## **Creating a Subaccount Table**

1. **Navigate to the Subaccount Table Tab:**\
   Within the module, click on the **Add Subaccounts Table** tab.
2. **Enter Table Details:**

   * **Code:** Select a unique code for the subaccount table.
   * **Description:** Provide a brief description of the table.
   * **Account-Friendly Names:** Define two names that will be displayed in reports for clarity.

   You can modify these details later by clicking the pencil icon next to the description.

## **Specifying Categories within a Subaccount Table**

Once you have created the subaccount table, you can specify four different categories of items:

* **Attributes:**\
  Labels assigned to accounts to facilitate later data filtering. For example, in a revenue model based on countries, an attribute might prompt the inputter to specify the country code, allowing for easy creation of totals by region.
* **Accounts:**\
  Represent key elements of your business model, such as product types (e.g., Executive Package, Essentials Package) or geographical categories (e.g., United States, The Netherlands, United Kingdom).
* **Subaccounts:**\
  Similar to regular Metrics, subaccounts are automatically created for every account. You'll need to specify the following:&#x20;
  * **Unique Code:** A distinct identifier used to reference this metric in formulas.
  * **Description:** A brief explanation of what the metric represents.
  * **Type of Account:** Specify whether the metric is classified as Income, Expense, Asset, Liability, or General. In the General settings, you can define your own number format and determine how Year-to-Date (YTD) numbers are calculated.
  * **Source for Actuals:** Define how real-world data is captured or calculated. Options include:
    * **Not Used:** Actual or planning data will not be utilized for this metric or account.
    * **Input:** Allows manual entry of actual or planning data.
    * **Formula:** Uses a formula to calculate actual or planning data.
    * **Actual Account:** Pulls data from an existing, connected GL or source system account.
  * **Source for Planning:** Determines how planning data is input or calculated for the metric.
* **Totals:**\
  Aggregated sums of the subaccount data that can later be used in budgets or forecasts. You can also filter on attributes to include or exclude specific accounts in these totals.
