First I have a dataset, below one which is the initial dataset now I transposed the value by grouping by Investment, Fund and Fund id
Before the transpose of the data:
| Fund | sell | buy | purchase | Cancel | Investment | Fund Id |
| ABC | 148 | 145 | 489 | 159 | 100 | 154 |
| ABC | 0 | 458 | 0 | 159 | 0 | 154 |
| ABC | 896 | 148 | 0 | 159 | 100 | 154 |
now I transposed the value by grouping by Investment, Fund, and Fund id with three transpose tool and union it back to one
Input:
| Fund | Name | value | selection | number id | Fund id | Investment |
| ABC | Buy | 145 | 1 | 154 | 100 | |
| ABC | Buy | 458 | 3 | 154 | 0 | |
| ABC | Buy | 148 | 8 | 154 | 100 | |
| ABC | Cancel | 159 | 154 | 100 | ||
| ABC | Cancel | 159 | 154 | 0 | ||
| ABC | Cancel | 159 | 154 | 100 | ||
| ABC | Purchase | 489 | 154 | 100 | ||
| ABC | Purchase | 0 | 5 | 154 | 100 | |
| ABC | Purchase | 0 | 1 | 154 | 0 | |
| ABC | Sell | 148 | 1 | 154 | 100 | |
| ABC | Sell | 0 | 154 | 0 | ||
| ABC | Sell | 896 | 154 | 100 |
The above table is transposed data and I performed a few calculations and added two columns selection and number id, now I want to reverse it back with the new columns opposite to
Output:
| Fund | sell | buy | purchase | Cancel | selection_sell | selection_buy | selection_purchase | selection_cancel | number_sell | number_buy | number_purchase | number_cancel | Investmen |
| ABC | 148 | 145 | 489 | 159 | 1 | 1 | 100 | ||||||
| ABC | 0 | 458 | 0 | 159 | 1 | 3 | 0 | ||||||
| ABC | 896 | 148 | 0 | 159 | 8 | 5 | 100 |
Solved! Go to Solution.
