Hello,
I have data that looks like this:
| Year | Country | Cases |
| 2018 | Germany | 15 |
| 2019 | Germany | 6 |
| 2020 | Germany | 7 |
| 2018 | Brazil | 8 |
| 2019 | Brazil | 5 |
| 2020 | Brazil | 2 |
What I wanto to do is calculate Cases - Cases from previous year. So the output should look like this:
| Year | Country | Cases | Total |
| 2018 | Germany | 15 | 15 |
| 2019 | Germany | 6 | -9 |
| 2020 | Germany | 7 | 1 |
| 2018 | Brazil | 8 | 8 |
| 2019 | Brazil | 5 | -3 |
| 2020 | Brazil | 2 | -3 |
Anyone can help? Thanks!!