Hi,
I'm looking for total of the columns and their percentage below, the issue is new columns might add or reduce , according i'm looking for total column, random data has been attached
| data | liam | noah | oliver | william | lucas |
| 868A | 10 | 20 | 30 | 40 | 10 |
| 979G | 30 | 40 | 50 | 80 | 20 |
Expected Output:
| data | liam | noah | oliver | william | sam | emma | henry | Total | Weights |
| 868A | 10 | 20 | 30 | 40 | 10 | 50 | 55 | 215 | |
| 868A | 5% | 9% | 14% | 19% | 5% | 23% | 26% | | 100% |
| 979G | 30 | 40 | 50 | 80 | 99 | 43 | 12 | 354 | |
| 979G | 8% | 11% | 14% | 23% | 28% | 12% | 3% | | 100% |
| 100D | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 280 | |
| 100D | 4% | 7% | 11% | 14% | 18% | 21% | 25% | | 100% |
as shown in the expected output , new columns and rows might add and calculation should be done accordingly.