and add extra _change_from metric to support API calculation of from change percent when there are more than two periods.
_change_frommetrics to the output. This allows users to get the new metrics that are displayed through the API when any number of periods are compared.
do we still expect the first row to show the
minus or should maybe the second have the
plus percentage? I guess we wouldn't want to mix the behaviour as it would be inconsistent. (not 100% sure why we're making this change that's why I'm asking I guess)
BTW there's also at least one system test failing.
Code looks good otherwise
You're comparing 12-17 w/ 1-31, so it's showing the change from 1-31 => 12-17, ie, jan 12-17 is 42% lower when compared with jan 1-31, so it's correct.