Thanks, Alansidman, I appreciate your help. Lucky you, it is already Sunday in my part of the world!

I added a tab with the data set as it will be maintained (CostCentreDataSet) and uploaded the new file to this thread. The cost item tab shows the result I am trying to obtain automatically with the power query.

I hope this helps and clarifies.