Hi, I need to transpose a table taking into account different variables.
The fields to be considered to group data are 'Plant' and 'Storage Location'.
The transposal is to be done for 'Quantity' and 'Amount' fields.
The reference period (field 'Ref_period') should be used as column header, adding the prefix "Quantity" and "Amount" based on the related transposed value.
In the attached file you can find an example of the "Starting Table" and the expected "Output".
The objective is to have a view month by month of the quantity and amount of the stock of the storage locations of a plant.
The idea is to see Quantity and Amount of month 1, Quantity and Amount of month 2 and so on...
The reference period could differ everytime I run the analysis, so I would like to sort the output columns whichever the reference periods could be.
I'd like to have some advices, since I can't find a way to automate all the logics. Thank you!