Well, this is your first post here, so I did it for you and retyped your table (althought as suggested by Glenn it would be nice if you just would attach the workbook).
I inserted data in an Excel Table so if you add new absences below, the table will auto expand.
Then used PowerQuery to produce a connection and transform content of this table and finaly used this connection as a source in Pivot Table.
The only thing left for you is the formatting of dates (especially if you see polish names of months sty, lut, mar ,...). And may be removing total rows and column (althought I think they are useful too).
So the usage is: once you add new data to list of absences, rightclick on any column in the pivot table and refresh it.
The listing of the PQ connection is as follows:
let
Source = Excel.CurrentWorkbook(){[Name="Tabela1"]}[Content],
#"Change Type using Local Settings" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Start", type date}, {"End", type date}}, "pl-PL"),
Added_column_with_all_single_days = Table.AddColumn(#"Change Type using Local Settings", "Single_days", each List.Dates([Start], Duration.TotalDays([End]-[Start])+1, #duration(1, 0, 0, 0))),
Expanded_Single_days_column = Table.ExpandListColumn(Added_column_with_all_single_days, "Single_days"),
#"Change Type2" = Table.TransformColumnTypes(Expanded_Single_days_column, {{"Single_days", type date}}, "pl-PL"),
#"Use End of Month" = Table.AddColumn(#"Change Type2", "End of Month", each Date.EndOfMonth([Single_days]), type any),
#"Change Type3" = Table.TransformColumnTypes(#"Use End of Month", {{"End of Month", type date}}, "pl-PL"),
Delete_unneded_columns = Table.RemoveColumns(#"Change Type3",{"Start", "End", "Single_days"})
in
Delete_unneded_columns
Bookmarks