Forum Discussion

TimmK's avatar
TimmK
Helper IV
3 years ago
Solved

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 ...
  • TomasAndersson's avatar
    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's avatar
    3 years ago

    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: