It is recommended to get familiar with

**dateAt**and**dateInterval**function before proceeding with this tutorial.## Link relative ratio

Link relative ratio refers to comparison between the current data and data of the previous period, for example value of indicator before one month. This can be done in BellaDati with very simple formula:

dateAt('now'){M_NUMBER}/dateAt('now-1m'){M_NUMBER}

If you need to aggregate the value for a period of time, use this formula instead:

dateInterval(date('now-1d'), date('now')) {M_NUMBER }/ dateInterval(date('now-1d-1m'), date('now-1m')) {M_NUMBER }

## Year-on-year Comparison

Year-on-year comparison is made between the results for a current period and the same period in the previous year. This can be done in BellaDati with very simple formula:

dateAt('now'){M_NUMBER }/dateAt('now-1y'){ M_NUMBER}

If you need to aggregate the value for a period of time, use this formula instead:

dateInterval(date('now-1d'), date('now')) {M_NUMBER }/ dateInterval(date('now-1d-1y'), date('now-1y')) {M_NUMBER }

Overview

Content Tools