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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

how to calculate two dates difference considering Friday off.

i need to calculate datedifference between two dates considering friday off.  As i used formula for delay is


"" delay = DATEDIFF(Sheet1[forecasted finish],Sheet1[baseline Finish],DAY)   """

 

which is showing -149 day, is there any way i can make friday off and it will show numbers considering holiday


baseline Finish   forecasted finish     delay

20 June 202416 November 2024-149
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Hi @Anonymous ,

 

try like:

 
delay = 
VAR _gap = DATEDIFF(Sheet1[forecasted finish],Sheet1[baseline Finish],DAY)
VAR _fri = INT(DIVIDE(_gap, 7))
RETURN _gap - _fri

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

Hi @Anonymous ,

 

try like:

 
delay = 
VAR _gap = DATEDIFF(Sheet1[forecasted finish],Sheet1[baseline Finish],DAY)
VAR _fri = INT(DIVIDE(_gap, 7))
RETURN _gap - _fri

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.