Hi Everyone!
I am having trouble trying to flatten out some data.
I would like to be able to take data that is structured like this:

And output something like this:

Also, I am trying to have the output's headers in column's D, E, & F to dynamically rename based on the input data's rows 3, 4, and 5. Another way of saying this is that I would like the output columns D, E, F (and more) to be dynamically renamed using the following convention "Bucket - Type - Metric", that uses the labels from the associated input data's rows.
I have attached a spreadsheet with the inputs and outputs to the post. I really appreciate any help!