Forum Discussion
AllanT1495
Feb 02, 2024Copper Contributor
Change data set structure, unsure how to transform this
I have a dataset that isn't structured ideally. I'm hoping someone can suggest a way to transform this. Current structure has different Gate purpose dates across in columns. Col1text-Projec...
- Feb 02, 2024
It could be done with Power Query
please see in attached file.
If with formulae it depends on which Excel platform/version you are and how big the source data.
AllanT1495
Feb 02, 2024Copper Contributor
SergeiBaklan thanks for the suggestion! Your sample file was helpful. While I was in Power Query, I noticed the Unpivot Columns transformation feature and it worked as well. I selected the 3 date columns to Unpivot and it transforms the table into desired tabular data. 2 solution options if anyone else has this use case. Thanks.
SergeiBaklan
Feb 02, 2024Diamond Contributor
Oops, I misunderstood how source data is organized. If from first table to second
yes, that's two-step Power Query script
let
Source = Excel.CurrentWorkbook(){[Name="data"]}[Content]
in
Table.UnpivotOtherColumns(Source, {"Project"}, "Gate", "Date")