Computed Value: Arithmetic mean trend
Create an extension of ComputedValueComponent, that calculates the following:
- Only for number valued answers
- Calculate the average of the values in the provided dataset and timeframe.
- Calculate the average of the values in the provided dataset and in the previous timeframe of the same length.
- Final output: Calculate the difference of change from between those two averages.
- i.e. current_timewindow_average - past_timewindow_average
If !588+ was not merged yet, base your MR off of it. That MR also includes some explanation what Computed values are about, plus an example: AverageTrendComputedValueComponent.
Data and timeframe are given by a DataViewControl (use .datasets[0], and .startDate and .endDate).
AverageTrendComputedValueComponent already does most of this. Please check the layouts and description, and update AverageTrendComputedValueComponent to do the correct calculation as described above (i.e. not percent).
Add Description for the computed value:
"This timeframe's average vs. last timeframe's average"
ComputedValueCategories (see docs computed-value-component.class.ts):
- Positve values: Class A
- Negative values: Class B
- 0 values: Class N
Clickup: https://app.clickup.com/t/861mz9jaq