Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Greetings...!!!
I have below data for which I want to calculate my Closing & Opening balance.
| Vertical | Year_Month | Amount Paid |
| RBG | 201603 | 100.5 |
| 201604 | 120.3 | |
| 201605 | 135.5 | |
| 201606 | 145.8 | |
| 201607 | 168.4 | |
| 201608 | 180.5 | |
| CBG | 201603 | 45.2 |
| 201604 | 58.6 | |
| 201605 | 65.9 | |
| 201606 | 75.2 | |
| 201607 | 88.8 | |
| 201608 | 98.1 | |
| RABG | 201603 | 24.5 |
| 201604 | 30.5 | |
| 201605 | 42.6 | |
| 201606 | 48.8 | |
| 201607 | 54.7 | |
| 201608 | 60.8 |
Below output is expected. Also Vertical & Year_Month are my dimension.
| Vertical | RBG | CBG | RABG | ||||||||||||
| Year_Month | 201604 | 201605 | 201606 | 201607 | 201608 | 201604 | 201605 | 201606 | 201607 | 201608 | 201604 | 201605 | 201606 | 201607 | 201608 |
| Closing Balance | 120.3 | 135.5 | 145.8 | 168.4 | 180.5 | 58.6 | 65.9 | 75.2 | 88.8 | 98.1 | 30.5 | 42.6 | 48.8 | 54.7 | 60.8 |
| Opening Balance | 100.5 | 120.3 | 135.5 | 145.8 | 168.4 | 45.2 | 58.6 | 65.9 | 75.2 | 88.8 | 24.5 | 30.5 | 42.6 | 48.8 | 54.7 |
Check this out