Tracking year-over-year performance is a common requirement in business reporting. But, maintaining formulas that rely on hardcoded year values can become cumbersome as data evolves over time. In scenarios where the reporting period changes regularly, a dynamic approach becomes essential.
In this blog, we’ll walk you through a simple example of how to calculate the variance between the Current Year and Previous Year in Inforiver dynamically, making your reports more scalable, efficient and easier to maintain.
For instance, let’s start by calculating the monthly Profit variance between 2024 and 2025 by inserting a Template row.
To do this, select any row under January month, then navigate to the Insert tab --> Insert Row --> Template Row.
The Template Rows feature allows you to automatically insert rows across all hierarchy levels in a single step, eliminating the need to add them individually as illustrated in the above screenshot.
Next, let’s create a dynamic formula to calculate the variance between the two years.
ROW.PARENT.MEMBERS[1] - ROW.PARENT.MEMBERS[0]
The above formula dynamically calculates the variance between members within the parent hierarchy (Months), specifically comparing values for the years 2025 and 2024. Since the calculation is dynamic, there is no need for manual updates when the year values change.
As demonstrated in the below screenshot, even when the dataset shifts to years like 2026 and 2025, the formula continues to work as expected, seamlessly adapting to the available data and consistently delivering accurate results without any additional adjustments.
To know more about ROW.PARENT identifier, click here.