Forum Discussion
TimmK
3 years agoHelper IV
Add 3 Days to Today Excluding Weekend
How can I add 3 days to TODAY() skipping the weekend? For example: TODAY() = TUE 2022-12-13 + 3 days then the result should be FRI 2022-12-16 TODAY() = WED 2022-12-14 + 3 days then the result ...
- 3 years ago
Hi!
You can combine IF()/SWITCH() and WEEKDAY() (WEEKDAY function (DAX) - DAX | Microsoft Learn) for this. Something like:Today + 3 = if( WEEKDAY( TODAY() + 3, 2) <= 2, //If weekday Mon or Tue... TODAY() + 3, //...add 3 TODAY() + 5 //Else add 5 )Hope this helps!
FreemanZ
3 years agoSuper User
hi TimmK
try to add a column with this:
DayPlus3 =
VAR _day = WEEKDAY([DATE],2)
RETURN
IF(
_day>=1&&_day<=2,
[DATE]+3,
[DATE]+5
)
i tried and it worked like this:
FrankGaraco
3 years agoRegular Visitor
Hola estimado, espero me pueda apoyar, utilice esta formula:
DayPlus3 =
VAR _day = WEEKDAY([DATE],2)
RETURN
IF(
_day>=1&&_day<=2,
[DATE]+3,
[DATE]+5
)
pero cuando la fecha cae en sabado o domigo me da una fecha incorrecta, por ejemplo:
tengo la fecha 29/04/2023 + 3 dias habiles la fecha correcta debe ser "03/05/2023 " pero a mi me da un dia de mas, me da la fecha 04/05/2023, me podria apoyar para saber donde esta el error.