The initial table looks this:
| Month | User | LeavesTaken |
|---|---|---|
| 2021-12 | User1 | 1 |
| 2022-01 | User1 | 2 |
| 2022-02 | User1 | 1 |
| 2022-02 | User2 | 2 |
| 2022-02 | User3 | 2 |
Here some users might not have data for few months. How to fill up those days with zero and use it inside the pivot?
The challenge is that the data needs to be pivoted and should look like this:
| Month | User1 | User2 | User3 |
|---|---|---|---|
| 2021-12 | 1 | 0 | 0 |
| 2022-01 | 2 | 0 | 0 |
| 2022-02 | 1 | 2 | 2 |
