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"
Suraj_K
1 year agoNew Member
First, check your data types and formats. If you are still getting errors, can you please share the error screen briefly if there is a specific error?