I use the following as the default in a text field to calculate the difference between 2 dates in business days and it works well an
With(
{
// generate a one-column table of all dates between start date & end date
gblDateRange: ForAll(
Sequence(dpEnd.SelectedDate - dpStart.SelectedDate + 1),
dpStart.SelectedDate + Value - 1
)
},
If(
And(
IsBlank(dpStart.SelectedDate),
IsBlank(dpEnd.SelectedDate)
),
// show nothing if any date pickers are blank
0,
// include only dates Monday to Friday
CountIf(
gblDateRange,
Weekday(Value) in [
2,
3,
4,
5,
6
]
)
)
)
I now need to take .5 off the figure if the following localVariable is true
conHalf
Is this possible?

Report
All responses (
Answers (