Power Query M code
let
Source = YourTable,
PivotedColumn = Table.Pivot(Source, List.Distinct(Source[Month]), "Month", "Sales", List.Sum)
in
PivotedColumn
Turns unique values from one column into separate columns, aggregating another column.
let
Source = YourTable,
PivotedColumn = Table.Pivot(Source, List.Distinct(Source[Month]), "Month", "Sales", List.Sum)
in
PivotedColumn
Replace List.Sum with another aggregation (List.Average, List.Max, and so on) if needed.
Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Pivot Columns.