So I've been looking at crosstab for pivoting but not sure if there is a more scalable way to do this.
Right now I have a structure that looks like
| Date | Amount1 | Amount2 | Amount3 |
|---|---|---|---|
| Date | 1 | 2 | 1 |
| Date | 1 | 3 | 2 |
| Date | 2 | 4 | 1 |
| Date | 3 | 5 | 2 |
I'd like to ideally get it into this format
| Date | Name | Amount |
|---|---|---|
| Date | Amount1 | 1 |
etc etc
Now the problem I have is that the Amount1 can be dynamic and can keep increasing over time. I'm trying to not have to hard code it as there's about 40 columns right now and I can see it increasing over time