albertan
Member
Hello, I have a year and month columns in text format (for example "2020" and "02") and I need to create another column with end of the month date. I had to do it in several steps, i.e. concatenate the year with month, convert it to date and then use Date.EndOfMonth formula. I was wondering if anyone can please suggest a shorter version.
#"Added Custom1" = Table.AddColumn(#"Renamed Columns2", "Posting Date", each [Fiscal Year]&[Period] &"28"),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom1",{{"Posting Date", type date}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type", "EOM", each Date.EndOfMonth([Posting Date]))
in
#"Added Custom2"
#"Added Custom1" = Table.AddColumn(#"Renamed Columns2", "Posting Date", each [Fiscal Year]&[Period] &"28"),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom1",{{"Posting Date", type date}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type", "EOM", each Date.EndOfMonth([Posting Date]))
in
#"Added Custom2"