I’m building a simple Profit & Loss budget forecast tool. With this tool you can generate a quick scan budget forecast within a few seconds at the main level for a period of 5 years.
If you choose, for example, financial year 2016, the table is shown with the years: 2016, 2017, 2018, 2019, 2020, 2021. If you choose, for example, financial year 2017, the table is shown with the years: 2017, 2018 2019, 2020, 2021, 2022.
My question:
How do I ensure that the 2017 Actuals are included in the 2017 column and the 2016 Actuals in the 2016 column.
So far I have the following:
{% assign start_date = period.year_start_date | date:"%Y" %}
{% assign end_date = period.year_end_date | date:"%Y" %}
{% assign revenue = period.accounts | range:‘70’ %}
| Description |{% if start_date == end_date %}{{ start_date }}{% else %}{{start_date}} - {{end_date}}{% endif %}{% for i in (1…5) %} | {{ INT(start_date+i) }}{% endfor %}
|------------|----------|----------|-----------|----------|----------|---------------+
|Revenue |{{revenue | currency }} | {{revenue | currency }} | {{revenue | currency }} | {{revenue | n_currency }} | {{revenue | currency }} | {{revenue | currency }}