Calculate Business days between two dates in PowerApps.
First, the Datdiff
function in PowerApps is used to calculate the difference between two dates in a specified unit of time, the unit of time to use for the calculation.
This can be one of the following: "day", "hour", "minute", "second", "month", "quarter", or "year".
But to calculate Business days between two dates excluding Weekends and Holidays, try to use this formula
RoundDown(DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, TimeUnit.Days) / 7, 0) * 5 +
Mod(5 + Weekday(DatePicker2.SelectedDate) - Weekday(DatePicker1.SelectedDate), 5) -
CountIf(Holidays, StartDate >= DatePicker1.SelectedDate, StartDate <= DatePicker2.SelectedDate)
For more details you can check this post that explains what this formula did!