Calculating with ratios of the previous year

Hi there,

I’m building a template where I need to show the ratios of the current and the previous year.
Calculating the ratios of the current year doesn’t give any problems, but I don’t know how to obtain the data of the previous year.

For instance this is the ratio of the liquidity of the current year:

{% assign liquiditeitruim = (#3+#40+#41+#50+#51+#52+#53+#54+#55+#56+#57+#58+#490+#491)/(#42+#43+#44+#45+#46+#47+#48+#492+#493) %}

But how do I calculate the ratio of the liquidity of the past year?

Thanks in advance!

Hello @cedric.devos,

There are different ways to get data from the previous year. I think the best way to calculate the liquidity ratio in your case would be

{% assign liquiditeitruim_prev_year = (#3:1y+#40:1y+#41:1y+#50:1y+#51:1y+#52:1y+#53:1y+#54:1y+#55:1y+#56:1y+#57:1y+#58:1y+#490:1y+#491:1y)/(#42:1y+#43:1y+#44:1y+#45:1y+#46:1y+#47:1y+#48:1y+#492:1y+#493:1y) %}

Hope this helps!

Kind regards,
Robin

Hello @robindeclercq,

Thanks a lot!

Kind regards,
Cedric