Transform 2 columns with numbers into a new date column in Power Query

27 Views Asked by At

I have a table with 2 columns in number format (MONTH and YEAR) And I want to add a date columns with the year, month and last day of the month so I tried this and gives me an error:

= Table.AddColumn(#"table", "Dates", each #date(Date.EndOfMonth([Month]),[Month],[Year]) as date)

Anybody knows how to figure it out? Thanks!

1

There are 1 best solutions below

0
davidebacci On BEST ANSWER
let a = #date([Year], [Month], 1), 
b = Date.EndOfMonth(a)
in b

enter image description here