let
Source = Excel.CurrentWorkbook(){[Name="T_MRS"]}[Content],
#"Type modifié" = Table.TransformColumnTypes(Source,{{"Employee", type text}, {"Date", type datetime}, {"Day Off?", type text},
{"Week n°", Int64.Type}, {"Month", Int64.Type}, {"Morning", type number}, {"Lunch From", type number}, {"Lunch To", type number},
{"Evening", type number}, {"Office Hours", type any}, {"Week", type number}, {"Month2", type number}, {"Project", type text},
{"Description", type text}, {"Duration decimal", Int64.Type}, {"Duration hours", type number}, {"Project-Man-Day", type number}}),
#"Requête ajoutée" = Table.Combine({#"Type modifié", Q_ILB}),
#"Type modifié1" = Table.TransformColumnTypes(#"Requête ajoutée",{{"day", type date}}),
#"Requête ajoutée1" = Table.Combine({T_MRS, Q_ILB}),
#"Requêtes fusionnées" = Table.NestedJoin(#"Requête ajoutée1", {"Date"}, Q_Calendrier, {"Calendrier"}, "T_Calendrier",
JoinKind.RightOuter),
#"T_Calendrier développé" = Table.ExpandTableColumn(#"Requêtes fusionnées", "T_Calendrier", {"Calendrier", "Date_Calendrier", "n°Jour_sem", "aujourdhui ", "Day type", "Week End"}, {"T_Calendrier.Calendrier", "T_Calendrier.Date_Calendrier", "T_Calendrier.n°Jour_sem", "T_Calendrier.aujourdhui ", "T_Calendrier.Day type", "T_Calendrier.Week End"}),
#"Colonnes renommées" = Table.RenameColumns(#"T_Calendrier développé",{{"T_Calendrier.aujourdhui ", "T_Calendrier.(dernièreMAJ)"}}),
#"Lignes triées" = Table.Sort(#"Colonnes renommées",{{"T_Calendrier.Date_Calendrier", Order.Ascending}}),
#"Colonne conditionnelle ajoutée" = Table.AddColumn(#"Lignes triées", "Day off?", each if [#"Day Off?"] <> null then [#"Day Off?"] else [T_Calendrier.Week End]),
#"1904_date" = Table.TransformColumns(#"Colonne conditionnelle ajoutée",{{"Date", each Date.AddDays( _,-Number.From( #date(1904,1,1))), type date}}),
#"1904_Day_date" = Table.TransformColumns(#"1904_date",{{"day", each Date.AddDays( _,-Number.From( #date(1904,1,1))), type date}}),
#"Colonnes permutées" = Table.ReorderColumns(#"1904_Day_date",{"Employee", "Date", "day", "Day off?",
"Day Off?", "Week n°", "Month", "Morning", "Lunch From", "Lunch To", "Evening", "Office Hours", "Week", "Month2",
"Project", "Description", "Duration decimal", "Duration hours", "Project-Man-Day", "nota", "hours/day", "matin",
"T_Calendrier.Calendrier", "T_Calendrier.Date_Calendrier", "T_Calendrier.n°Jour_sem", "T_Calendrier.(dernièreMAJ)",
"T_Calendrier.Week End"}),
#"Colonnes supprimées" = Table.RemoveColumns(#"Colonnes permutées",{"Day Off?", "T_Calendrier.Week End"})
in
#"Colonnes supprimées"