AsOfCalendar
When we perform financial analysis, we have to be able to easily adjust over which period we are going calculate each metric. For example, return on assets is net income divided by total assets. Net income is calculated over the past twelve months while total assets is an accumulated amount calculated over all previous months.
We can use set analysis to calculate these metrics at any one moment in time; however, we also would like to visualize the trend of these metrics. The best way to calculate that trend is to combine set analysis with an AsOfCalendar
.
An AsOfCalendar
contains the same months and years as a regular calendar. However, when we select a date in the AsOfCalendar
, we see everything that is prior to this data in the Facts
table. For example, in the following diagram if we select 2013-Jun in the AsOf Year-Month field, then we see all months prior to it in the data model as possible values in the Year-Month field:
We use a subroutine, Qvc.AsOfTable
in QV Components...