Forum Discussion
pect
8 years agoHelper I
Table transformation
Hello everybody, I would like to transform the following table: Contracte Tipus contracte Contractació any 2017 Adjudicat any 2017 Contractació any 2018 Adjudicat any 2018 1 A 10...
- 8 years ago
Select the first 2 columns, unpivot other columns.
Adjust the generated code with regard to the names of the new columns.
Split the Estat column with custom delimiter " any ".
Adjust both lines of the generated code with regard to the names of the new columns.let Source = Table3, #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Contracte", "Tipus contracte"}, "Estat", "Import"), #"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Estat", Splitter.SplitTextByDelimiter(" any ", QuoteStyle.Csv), {"Estat", "Any"}), #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Estat", type text}, {"Any", Int64.Type}}) in #"Changed Type"
MarcelBeug
8 years agoCommunity Champion
Select the first 2 columns, unpivot other columns.
Adjust the generated code with regard to the names of the new columns.
Split the Estat column with custom delimiter " any ".
Adjust both lines of the generated code with regard to the names of the new columns.
let
Source = Table3,
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Contracte", "Tipus contracte"}, "Estat", "Import"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Estat", Splitter.SplitTextByDelimiter(" any ", QuoteStyle.Csv), {"Estat", "Any"}),
#"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Estat", type text}, {"Any", Int64.Type}})
in
#"Changed Type"
- pect8 years agoHelper I
Thank you very much!
It certainly works!