Hi Mr Excel Community,
I would like to unstack this data using Power Query in order to have a clean list to pivot.
Desired situation > To have a table with the following headers: Market, Items, Years, Month, Values.
Change vs prior Year will be filtered out of the data sample.
I know that I need to merge, transpose, unpivot, unmerge and pivot but does anyone have an idea how to split the Items colums into Years & Items?
Data Sample:
[TABLE="width: 425"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Market[/TD]
[TD]Items[/TD]
[TD]Column2[/TD]
[TD]Column3[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Occupancy (%)[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2016[/TD]
[TD]60[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2017[/TD]
[TD]60[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2018[/TD]
[TD]61[/TD]
[TD]71[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2019[/TD]
[TD]65[/TD]
[TD]73[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Change vs prior year (%)[/TD]
[TD]0.394330743[/TD]
[TD]0.063125438[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Average Daily Rate[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2016[/TD]
[TD]70[/TD]
[TD]90[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2017[/TD]
[TD]80[/TD]
[TD]86[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2018[/TD]
[TD]83[/TD]
[TD]86[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2019[/TD]
[TD]90[/TD]
[TD]87[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Change vs prior year (%)[/TD]
[TD]1.690275579[/TD]
[TD]-0.105899308[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]RevPAR[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2016[/TD]
[TD]50[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2017[/TD]
[TD]56[/TD]
[TD]62[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2018[/TD]
[TD]56[/TD]
[TD]61[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2019[/TD]
[TD]55[/TD]
[TD]53[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Change vs prior year (%)[/TD]
[TD]2.091271599[/TD]
[TD]-0.04284072[/TD]
[/TR]
</tbody>[/TABLE]
Many thanks in advance for your precious time!
Best ,
Matt
I would like to unstack this data using Power Query in order to have a clean list to pivot.
Desired situation > To have a table with the following headers: Market, Items, Years, Month, Values.
Change vs prior Year will be filtered out of the data sample.
I know that I need to merge, transpose, unpivot, unmerge and pivot but does anyone have an idea how to split the Items colums into Years & Items?
Data Sample:
[TABLE="width: 425"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Market[/TD]
[TD]Items[/TD]
[TD]Column2[/TD]
[TD]Column3[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Occupancy (%)[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2016[/TD]
[TD]60[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2017[/TD]
[TD]60[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2018[/TD]
[TD]61[/TD]
[TD]71[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2019[/TD]
[TD]65[/TD]
[TD]73[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Change vs prior year (%)[/TD]
[TD]0.394330743[/TD]
[TD]0.063125438[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Average Daily Rate[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2016[/TD]
[TD]70[/TD]
[TD]90[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2017[/TD]
[TD]80[/TD]
[TD]86[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2018[/TD]
[TD]83[/TD]
[TD]86[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2019[/TD]
[TD]90[/TD]
[TD]87[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Change vs prior year (%)[/TD]
[TD]1.690275579[/TD]
[TD]-0.105899308[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]RevPAR[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2016[/TD]
[TD]50[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2017[/TD]
[TD]56[/TD]
[TD]62[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2018[/TD]
[TD]56[/TD]
[TD]61[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]2019[/TD]
[TD]55[/TD]
[TD]53[/TD]
[/TR]
[TR]
[TD]England[/TD]
[TD]Change vs prior year (%)[/TD]
[TD]2.091271599[/TD]
[TD]-0.04284072[/TD]
[/TR]
</tbody>[/TABLE]
Many thanks in advance for your precious time!
Best ,
Matt