I have a data table containing rows of monthly data, similar to below,
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Period[/TD]
[TD]Volume[/TD]
[TD]Revenue[/TD]
[TD]Margin[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]8/1/2016[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/1/2016[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]7/1/2016[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]9/1/2016[/TD]
[TD]8[/TD]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I would like to use Power Query to create a table that outputs the following:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]MTD - Volume[/TD]
[TD]MTD - Revenue[/TD]
[TD]MTD - Margin[/TD]
[TD]YTD - Volume[/TD]
[TD]YTD - Revenue[/TD]
[TD]YTD - Margin[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]10[/TD]
[TD]60[/TD]
[TD]40[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]8[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]18[/TD]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
This assumes that the "current" month is September 2016 (not necessarily always the latest month of the data, so the month designated as current needs to be a parameter type selection).
At first I thought this would be fairly simple but when I actually started working on it, I am drawing a blank.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Period[/TD]
[TD]Volume[/TD]
[TD]Revenue[/TD]
[TD]Margin[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]8/1/2016[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/1/2016[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]7/1/2016[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]9/1/2016[/TD]
[TD]8[/TD]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I would like to use Power Query to create a table that outputs the following:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]MTD - Volume[/TD]
[TD]MTD - Revenue[/TD]
[TD]MTD - Margin[/TD]
[TD]YTD - Volume[/TD]
[TD]YTD - Revenue[/TD]
[TD]YTD - Margin[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]10[/TD]
[TD]60[/TD]
[TD]40[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]8[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]18[/TD]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
This assumes that the "current" month is September 2016 (not necessarily always the latest month of the data, so the month designated as current needs to be a parameter type selection).
At first I thought this would be fairly simple but when I actually started working on it, I am drawing a blank.