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

Negative Net Work Days

Good afternoon! 

I'm trying to calculate net work days for my company. I was using a DAX syntax to calculate it, however we do accept NEGATIVE networkdays at our office and the DAX is rejecting the negative numbers. Does anyone have a solution to calculate a networkdays difference that will allow me to have negative? 

This was the dax formula I was using 

""NetWorkDays =
(Var TBL_Date=CALENDAR('COMPLETED (2)'[BATCH DATE],'COMPLETED (2)'[COMPLETED DATE])

vAR TBL_FinalDate=
ADDCOLUMNS(TBL_date,
"WorkingDay",if(weekday([Date],2)>=6,0,1),
"Holiday",iferror(lookupvalue('MY COMPANY CALENDAR'[Holiday Count],'MY COMPANY CALENDAR'[Holiday Date],[Date]),0)
)
Return
sumx(tbl_finalDate, if([WorkingDay]=1 && [Holiday]=0, 1, 0))""

The error I got was " The start date in Calendar function can not be later than the end date"


1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , refer to 2nd page(working day diff) -https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

 

If that can help .

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.