r/ExcelPowerQuery • u/AlexDemille • Nov 28 '25
Copying a value from 1 col to one of multiple based on another column
I have a table with 2 columns, a single year (2021,2022,2023,etc) and a value. Does PQ have the ability to create new columns for each year and copy the value into only the associated column in a single step (or 2-3 steps) or do I need to create a conditional column for each year I have? I'd like this to be auto expanded when new years are added.
Ex.
Row1, 2021, $450
Row2, 2021, $100
Row3, 2022, $245
Row4, 2023, $333
Becomes:
Row1,2021,$450,{blank},{blank}
Row2,2021,$100,{blank},{blank}
Row3,2022,{blank},$245,{blank}
Row4,2023,{blank},{blank},$333
(there is other data in the table but these are the relevant columns)

