let
    Source = Sql.Database(".", "RetailBIDW", [Query="select distinct#(lf)concat(year(dateadd(year, 2, [BusinessDayDate] )),RIGHT('0'+cast(month(dateadd(year, 2, [BusinessDayDate] )) as varchar(2)), 2), RIGHT('0'+cast(day(dateadd(year, 2, [BusinessDayDate] )) as varchar(2)), 2) ) ReportingPeriodID, #(lf)  month(dateadd(year, 2, [BusinessDayDate] )) Period, #(lf)  left(DATENAME(month, dateadd(year, 2, [BusinessDayDate] )), 3) FiscalMonth, #(lf)  year(dateadd(year, 2, [BusinessDayDate] ) ) FiscalYear, #(lf)  dateadd(year, 2, [BusinessDayDate] ) [BusinessDayDate]#(lf)from [Time_Dimension]"]),
    #"Renamed Columns" = Table.RenameColumns(Source, {{"ReportingPeriodID", "ReportingPeriodID"}, {"Period", "Period"}, {"FiscalYear", "FiscalYear"}, {"FiscalMonth", "FiscalMonth"}, {"BusinessDayDate", "Month"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns", {{"ReportingPeriodID", Int64.Type}, {"Period", Int64.Type}, {"FiscalYear", Int64.Type}, {"FiscalMonth", type text}, {"Month", type datetime}})
in
    #"Changed Type"