I have a dataset like this, i would like to summarize by grouping transaction ID and selecting the last non-null value, if any (if no non-null value, i would like to have null shows in the output). The intended output is as shown below in the second table. Please kindly advise what can i do? Thanks!!
| Transaction ID | Payment plan |
| 1 | A |
| 1 | |
| 1 | B |
| 1 | |
| 2 | A |
| 2 | |
| 2 | |
| 3 | |
| 3 | B |
| 3 | |
| 4 | |
| 4 | |
| Transaction no. | Payment plan |
| 1 | B |
| 2 | A |
| 3 | B |
| 4 | |