# Definition of analytical distribution

To track and analyze **costs** and **profitability**, it is essential to structure and organize information according to **analytical axes**.

In our example, we will **distribute sales by department and by region**.

To do this, **analytical management must be enabled by checking** the corresponding box in:\
**Settings > Plug-ins and option selection, \[\[Accounting]].**

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2F8mF8yxNmYKq6JhSWIlJQ%2FAn.management.png?alt=media&#x26;token=680bd413-5c3c-4520-a115-fd4a41440d10" alt=""><figcaption></figcaption></figure>

Then click **\[\[Save]].**

### Analytical axes and codes

Next, it is necessary to **define the analytical axes** via:\
**Accounting > Basic files > Analytical chart of accounts > Analytical axes.**\
Here you can **create the axes** and **associate the different values** corresponding to the available analytical codes.

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2FhOtRlXJH93yhUMCpQW0M%2Flist.an.axis.png?alt=media&#x26;token=4b896bc8-1761-4ca7-87c1-6c8f8a7ff019" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2F3vsJYtMSaGxAxEXb0YEL%2Fmod.an.axis.png?alt=media&#x26;token=cbbe2a96-455f-4ce4-a871-a9dca05fd421" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2F3epITYRIkARUzUAOOolT%2Fmod.zn.axis.png?alt=media&#x26;token=2d3c4e63-953f-4fdc-8cba-875ba7132df6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The analytical code formula allows you to dynamically assign the analytical code during allocations.\
It is automatically applied in the allocation lines. See [#dynamic-analytical-code](#dynamic-analytical-code "mention").
{% endhint %}

Next, it is necessary to **define an analytical distribution**, which will be used on documents such as invoices and will determine the breakdown by axis.\
To do this, go to:\
**Accounting > Basic files > Analytical chart of accounts > Analytical distributions**.\
For example, you can define a **method of distribution for invoices.**

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2Fc5hTrSMmkgMxY6AUJBWH%2FPar%20dep%20et%20zn.png?alt=media&#x26;token=0cc1ea1b-ba22-4d48-932a-1fa1518bb2ae" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Analytical distribution lines** that contain **neither an analytical code nor a formula** are highlighted in yellow.\
This makes it easier to **identify incomplete lines**, especially after **importing a list of analytical distribution** from an Excel file or any other import file.&#x20;
{% endhint %}

## Note

### Multi-axis distribution

It is possible to **define a distribution that includes repeated axes** with different analytical codes.\
However, the **total distribution for each axis** must always equal **100%**.

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2FS5vv4kpihgt6fYdEN9Gm%2FD1D2.png?alt=media&#x26;token=55f7aab0-2707-4545-a247-f66dccdcd4ef" alt=""><figcaption></figcaption></figure>

### Dynamic analytical code

In a distribution, it is possible **not to fix the value of the analytical code** and to **make it dynamic**, so that the code differs depending on each situation.

To do this, simply **leave the analytical code empty** and **define a formula** that will automatically determine the analytical code depending on the case.

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2FEh82dadCZTCZdL73zVhv%2FForm..png?alt=media&#x26;token=fa9eb870-8eaf-4105-81e3-984f5a8766a0" alt=""><figcaption></figcaption></figure>

In our example, the distribution will be **used for invoices**, so the formula must depend on the information available in the invoice.

Here, we want the **analytical code** to be :

* **D2 Marketing** if the salesperson on the invoice belongs to the Marketing team,
* **D1 Commercial** otherwise.

The **analytical code will be automatically calculated** when the invoice is created.

### Analytical distribution by account

It is also possible to directly **assign an analytical distribution to accounts** (expense or income accounts).

As a result, documents and amounts related to these accounts will be **automatically allocated according to the analytical distribution** defined for each account.

To proceed, go to:\
**Accounting > Basic files > General chart of accounts**, open the record of the relevant account, then **assign it an analytical distribution**.

<figure><img src="https://3774355255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEcRYDc0Yd5qgDsaJt5p%2Fuploads%2FeJtkIOsQEo41rNfK74wP%2F701000.png?alt=media&#x26;token=b43001ea-e817-4fda-be7f-af044bd3f527" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
It is also possible **to assign an analytical code** to an account, **but it is not possible to use both an analytical code and an analytical distribution at the same time.**
{% endhint %}
