I feel the most difficult part is to get the data to output in exactly the same way as the required output. Generally I would have stacked the output dimensions and measurement fields in a different way - but it's good fun trying to match the format.