Hello everyone,
I am doing a transformation in order to group by and return some records as separate columns:

This yields the following output:

However, for some Mall_ID-Product_ID pairs, there are more than two FRE's (maximum of 4). I would like to add all FRE's in subsequent columns. This would yield a total of 9 fields:
| Mall_ID | Product_ID | Net_Revs | Deal_Number | Product_ID2 | FRE_1 | FRE_2 | FRE_3 | FRE_4 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| ... | .. | ... | ... | ... | ... | ... | ... | ... |
Can anyone help me do that? Your help would be much appreciated!
Thanks 😊