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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
spandy34
Responsive Resident
Responsive Resident

Working days column from Date Column

I have a data table that contains a Start Date and I want a column called Target Date which is 30 working days from the Start Date.  I also have a calendar table which I can connect to the Start Date if needed.

 

Can someone help with the DAX for the column or M Code if I need to do this in Power Query?  Can I also have the option to put Holidays in ie Christmas Day, New Years day etc.

 

Many thanks

 

@tamerj1 @amitchandak @parry2k @Anonymous 

4 REPLIES 4
parry2k
Super User
Super User

@spandy34 maybe you also want to check this video on my YT channel How to calculate shipping date based on the working date ignore non working days - Power BI - YouTub...



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@spandy34 Yes whatever column is used for the start date.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@spandy34 try this, add new column:

 

Target Date = 
VAR __TargetDays = 30 
VAR __StartDate = Table[Start Date]
VAR __TargetDate = __StartDate + __TargetDays
VAR __TargetDateWeekDay = WEEKDAY ( __TargetDate, 3 )
VAR __AddDays = IF ( __TargetDateWeekDay  IN { 5, 6 }, 7 - __TargetDateWeekDay, 0 ) 
VAR __TargetWorkingDate = __TargetDate + __AddDays
RETURN __TargetWorkingDate 


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

spandy34
Responsive Resident
Responsive Resident

Thank you for responding. So I have put the following in the column but it is calculating 30 days and including weekends.  Is the Date in line 3 supposed to be from my date table or as outlined below, from the Caseload Oversight'[ASMStartDate] field? 

 

spandy34_0-1697124997866.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors