Business Days Age calculation between two dates excluding weekends
i am trying to create a column Business Days Age in power BI (Difference between two dates excluding weekends). below is the table i am referring to.
Note: "Reporting Date" column is created by Formula. finding difficulty in arriving "Network days"
tried creating a query as below, but it didn't work as the "Reporting Date" column not appearing in the formula bar. As it is not in the original Data table(it is created by a formula)
= (StartDate as date, EndDate as date) as number => let ListDates = List.Dates(StartDate, Number.From(EndDate-StartDate),#duration(1,0,0,0)), RemoveWeekends = List.Select(ListDates, each Date.DayOfWeek(_, Day.Monday)< 5), CountDays = List.Count(RemoveWeekends) in CountDays