analytical_type_(0..x)_codes
This drop contains information about a particular dimension or set of companies. Remember that there can be several analytical types to loop over starting from 0 (i.e. analytical_type_0_codes, analytical_type_1_codes, analytical_type_2_codes, etc.).
These drops and methods can be used to access both analytical (file with dimensions) and consolidation (file with several companies) data.
Methods
Method | Return type | Description |
---|---|---|
code | integer | Unique code that each company/dimension category has. It can be used together with the analytical_code filter as seen in the example below. |
reference | string | The name of the company/dimension category. |
Example 1
To print the name and code for each category within Dimension 1:
{% for dimension in company.analytical_type_1_codes %}
{{ dimension.reference }}
{{ dimension.code }}
{% endfor %}
Shop 1
603
Shop 2
604
Shop 3
605
Example 2
To get the name and value of the accounts for that particular dimension category:
{% for dimension in company.analytical_type_1_codes %}
{{ dimension.reference }}
{{ dimension.code }}
{% assign accounts = period.accounts | analytical_code:dimension.code | range:"4" %}
{% for account in accounts %}
{{ account.link }} = {{ account.value | currency }}
{% endfor %}
{% endfor %}
Shop 1
603
400001 Sales = -1,000.00
---------------------------------Shop 2
604
400001 Sales = -2,000.00
---------------------------------Shop 3
605
400001 Sales = -3,000.00
Example 3
We can use the same logic from Example 2 to get the company names, codes and their respective account values in a consolidation file:
{% for entity in company.analytical_type_1_codes %}
{{ entity.reference }}
{{ entity.code }}
{% assign accounts = period.accounts | analytical_code:entity.code | range:"4" %}
{% for account in accounts %}
{{ account.link }} = {{ account.value | currency }}
{% endfor %}
{% endfor %}
Company A Ltd.
101
400001 Sales = -500,000.00
---------------------------------Company B Ltd.
102
400001 Sales = -600,000.00
---------------------------------Company C Ltd.
103
400001 Sales = -700,000.00
Updated over 2 years ago