We often get the requirement of calculating rolling averages and accumulations of values over a period of time. And we mostly think of calculating these on the frontend (in chart expressions) using the Above() function. This works fine when we have a small amount of data, but when the data grows, the chart that calculates the accumulations or rolling averages starts affecting performance. In such a situation, it is recommended to move the calculation somehow in the script. The As-Of Table helps to achieve rolling averages and accumulations in the script.
Before we start learning about the As-Of Table, let's understand what accumulations are.
An accumulation is the summation of the data from previous x dimension values, and mostly, it is calculated over a time dimension. For example, the following screenshot shows the full accumulation:
You can see in the preceding...