Forum Discussion
BSXS
8 years agoFrequent Visitor
Merge 2 "date" columns with Add columns from Example OR Merge OR Group By
Im trying to make new column from Year and Month columns. They have been set to Whole number. Year is 2015, 2016 etc BUT Month is 1, 2, ,3 .. 10, 11 and 12 The result I want is a new column called...
- 8 years ago
Hi,
Try this M code
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", type text}, {"Month", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [Year]&Text.PadStart([Month],2,"0")) in #"Added Custom" - 8 years ago
Works. Many Thanks
Ashish_Mathur
8 years agoSuper User
Hi,
Try this M code
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", type text}, {"Month", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [Year]&Text.PadStart([Month],2,"0"))
in
#"Added Custom"BSXS
8 years agoFrequent Visitor
Works. Many Thanks
- Ashish_Mathur8 years agoSuper User
Hi BSXS,
Whom are you replying to? Whose solution worked for you? Please mark the relevant response as Answer.