Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Uspace87
Resolver III
Resolver III

Next working day calculation

Hi all,

 

I hope someone can help me 🙂

 

I would like to calculate a "Due date" having an "Order date"  without considering Weekends and Holidays.

 

I will give you a simple example:

 

Order date = 25/08/2023 (Friday). I need to add 3 working days so the final "Due date" would be 30/08/2023 (this is because I consider the 25, then skip 26 and 27 (Saturday and Sunday) and skip also 28 (Bank Holiday) and finally considering 29 and 30.

 

I am struggling to create a formula in dax or a calculated column.

 

Can someone help me?

 

thank you.

3 REPLIES 3
ThxAlot
Super User
Super User

Due date.pbix

 

On top of "old-school" way, newly-released WINDOW functions, OFFSET() to be exact here in your case, come into play in measures and calculated columns.

ThxAlot_0-1694452670658.png

 

ThxAlot_1-1694452713043.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



hi @ThxAlot ,

thank you for your help. The formula is working for any working day but if I want to offset a "Saturday", It does return me "Blank".


Uspace87_0-1695220673020.png

For thjs order created on saturday the deadline should be next monday but the offset formula is returning me Blank.

 

Please find below the formula I am using:

Due_date CC =
VAR _duration =
SWITCH(
    TRUE(),
    'Interim Sales Header PS +PSF'[Duration]=0,'Interim Sales Header PS +PSF'[Duration],
    'Interim Sales Header PS +PSF'[Duration]=1,'Interim Sales Header PS +PSF'[Duration],
    'Interim Sales Header PS +PSF'[Duration]=2,'Interim Sales Header PS +PSF'[Duration]-1,
    'Interim Sales Header PS +PSF'[Duration]=3,'Interim Sales Header PS +PSF'[Duration]
)
   
   
   
Var result =

MAXX(
    OFFSET(
     _duration,
        FILTER(
            ALLSELECTED(Date_Table),
         Date_Table[Working day?]=1
        ),
        ORDERBY(Date_Table[Date])
        ),
        Date_Table[Date]
       

    )

    return result

 

johnt75
Super User
Super User

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.