Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have been trying to create membership days for employees based on their start date and end date and our holiday table. My current calculated column looks like this,
Var TBL_Date = Calendar('tEmployee'[Enter_Date],'tEmployee'[Leave_Date])
Var TBL_Finaldt =
ADDCOLUMNS(TBL_Date,
"Work Days", If(WEEKDAY([Date],2)>5,0,1)
"Off Days", IFERROR(LOOKUPVALUE('tCompanyCalendar'[Day_Count],'tCompanyCalendar'[Date],[Date],0))
Return
If(SUMX(TBL_Finaldt, IF[Work Days] = 1 && [Off Days] =1,1,0))=0,1,(SUMX(TBL_Finaldt,IF([Work Days] = 1 && [Off Days] =1,1,0))))
However, I currently have employees who will be starting in the future and this formula is not working for them and causing error overall. Is there a way I can block that?
@supergallager34 , refer if this blog can help
Or this file, check the second page - Datediff with and without week end
https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0
or
https://www.dropbox.com/s/bqbei7b8qbq5xez/leavebetweendates.pbix?dl=0