Forum Discussion
himaan_she
1 year agoNew Member
MERGE QUERIES
Hi, I was trying to merge three columns called Day, Month and Year in Power Query to form a new column called "Date" and then changing the type of the "Date" column to date type, but getting errors ...
- 1 year ago
Hi himaan_she
Have a look at thisHere's the code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Day", Int64.Type}, {"Month", Int64.Type}, {"Year", Int64.Type}}),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Changed Type", {{"Day", type text}, {"Month", type text}, {"Year", type text}}, "en-IN"),{"Day", "Month", "Year"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Date"),
#"Changed Type1" = Table.TransformColumnTypes(#"Merged Columns",{{"Date", type date}})
in
#"Changed Type1"
mussaenda
Community Champion
1 year agoHi himaan_she ,
What is the error you are enconutering? Usually the error is caused by different data types that you are trying to merge into one column.