Hi,
Here is my dataset:
| Name | Policy no | Accounting Period | Amount |
| ABC | 123 | 2023_01_31 | 100 |
| ABC | 123 | 2023_02_28 | 500 |
| XYZ | 456 | 2023_01_31 | 200 |
| XYZ | 456 | 2023_02_28 | 700 |
I am transposing this table and calculating difference of amount between current month and previous month:
| Name | Policy no | 2023_01_31 | 2023_02_28 | 2023_01_31_Development | 2023_02_28_Development |
| ABC | 123 | 100 | 500 | 0 | 400 |
| XYZ | 456 | 200 | 600 | 0 | 500 |
I am looking to get result as show in below table:
How can I get from calculating difference of amount shown in above table to as shown in below table? thank you.
| Name | Policy no | Accounting Period | Amount | Development |
| ABC | 123 | 2023_01_31 | 100 | 0 |
| ABC | 123 | 2023_02_28 | 500 | 400 |
| XYZ | 456 | 2023_01_31 | 200 | 0 |
| XYZ | 456 | 2023_02_28 | 700 | 500 |