This technique can be applied to time series data to add a weight function on how important Y is based on recency X. To add more importance to more recents days simply reverse the output.
GENERATE_ARRAY()
is used to populate the periods, i.e. number of days.
(1 - (period / (total_periods + 1))^3)^3
QueryStash
Created: Oct 21st 2020