My app has a survey, and a dashboard view that displays the data.
I’m trying to show the % increase/decrease in a survey score compared to the last one.
When viewing the dashboard a user can select either to view the results of a specific survey, or an aggregate result (average) of all the surveys.
I’m trying to show % change of the result compared to the last, but for the aggregate view, I’m trying to show the % change compared to the aggregate score minus the last survey.
If 3 surveys have been taken and user selects survey 2, the % change of results would reflect survey 2 compared to survey 1. If a user selects survey 3, the % change of results would reflect survey 3 compared to survey 2.
For aggregate view the % change would reflect % change of survey 3 compared with average result of Survey 1 & Survey 2. If a fourth survey was completed, the aggregate view would reflect % change of survey 4 compared with average result of Survey 1, 2 and 3.
I have tried last item -1 as a starting point but haven’t been able to get there and not sure this is correct anyway…
Any thoughts or guidance appreciated.