Forum Discussion
need some help to transform my table
- 2 years ago
Krijgersss , You can do that using unpivot
In the Power Query Editor, select the columns that you want to keep as they are (e.g., colum1 and colum2).
Right-click on the selected columns and choose Unpivot Other Columns. This will transform the monthly columns into rows.Add a custom column to convert the month names to dates. You can use a formula like this:
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Date", each Date.FromText("01-" & [Attribute] & "-2024"), type date)
Krijgersss , You can do that using unpivot
In the Power Query Editor, select the columns that you want to keep as they are (e.g., colum1 and colum2).
Right-click on the selected columns and choose Unpivot Other Columns. This will transform the monthly columns into rows.
Add a custom column to convert the month names to dates. You can use a formula like this:
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Date", each Date.FromText("01-" & [Attribute] & "-2024"), type date)