Profit last year

Hi

I want to refer to the result (profit or loss) of previous year. (or even 2 or 3 years ago)
How do I do this?

Hi Zena,

Let’s say that the value you want to refer, is defined in another template and a result tag is created there. You will need to know which is the handle of that template and which one is the result tag name.

Then, you can refer to that result with the following syntax:

{{ period.reconciliations.template_handle.results.result_tag_name }}

The previous code will refer the variable from the same period. So, to refer to the same variable from the previous year, you can use “minus_1y”, like this:

{{ period.minus_1y.reconciliations.template_handle.results.result_tag_name }}

{{ period.minus_2y.reconciliations.template_handle.results.result_tag_name }}

Also, you can apply the same logic if you are getting the information directly from the accounts. In that case (for example if you want to reach the accounts classified as revenue) you can use:

{{ period.accounts.revenues }}

{{ period.minus_1y.accounts.revenues }}

In the previous post there is a detailed case showing the use of result tags that could be useful.
Also, there is an explanation of how to reference results in case they are defined in the same template you are working on and not taken from a different one (see: "How to call on that result then from a previous period?)

I hope this help you!