We need to calculate and use in a line graph the difference, based on ID, of the prior year v. current year.
So far, we have 2 years but this will need to work generally. Naturally the first year 2015 would have no "difference" record. The subsequent years would.
ID | Year | Ratio |
1001638 | 2016 | 3.57 |
1001638 | 2015 | 4.18 |
1003346 | 2015 | 0.25 |
1003346 | 2016 | 2.19 |
1003750 | 2015 | 0.49 |
1003750 | 2016 | 0.50 |
1003764 | 2015 | 3.07 |
1003764 | 2016 | 4.07 |
1003767 | 2016 | 2.11 |
1003767 | 2015 | 2.26 |
We are calculating the ratio, currently, as a measure.
Is this all best done in the load script, or as a calculated measure?