Number of Working Days Calculation Using Power Query and DAX

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I am surprised this video is not like more.
This is incredibly useful! Thank you so much! 💪

Invoeren
Автор

Code using Power Query Function:-

(StartDate as date, EndDate as date) as number =>

let
ListofDates = List.Dates(StartDate, Number.From(EndDate-StartDate)+1, #duration(1, 0, 0, 0)),
ExcludeWeekends= List.Select(ListofDates, each Date.DayOfWeek(_, Day.Monday)<5),
DayCount= List.Count(ExcludeWeekends)

in
DayCount

SimpleAnalysis