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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
mina97
Helper III
Helper III

date difference

i have the following data 

i want the to exclude friday and saturday also o want to exclude the start date and start counting from the next day
so want to show the date diff as 3 not 4 

please help and thank you  
i wrote in date the following 

 

workdays = 

var TBL_DATE=CALENDAR(sheet[start date],sheet{end date])
var TBL_FINALDATE= ADDCOLUMNS(TBL_DATE,"WorkingDate",IF(WEEKDAY([Date],2)>=6,0,1))
return
SUMX(TBL_FINALDATE,IF([WorkingDate]=1,1,0))​

 

 
this is how it looks now 


start date end date date diff
23-05-2023 10:07:1128-05-2023 14:07:114
1 ACCEPTED SOLUTION
ChiragGarg2512
Solution Sage
Solution Sage

Currently, the dax expression is marking saturday and sunday as 0 rather than friday and saturday. For, friday and saturday change WEEKDAY([Date], 2) to WEEKDAY([Date], 1). This will mark friday as 6 and saturday as 7 instead of marking friday as 5, saturday as 6 and sunday as 7.

 

Also, if one day has to be removed every time remove 1 from the total sum.

View solution in original post

1 REPLY 1
ChiragGarg2512
Solution Sage
Solution Sage

Currently, the dax expression is marking saturday and sunday as 0 rather than friday and saturday. For, friday and saturday change WEEKDAY([Date], 2) to WEEKDAY([Date], 1). This will mark friday as 6 and saturday as 7 instead of marking friday as 5, saturday as 6 and sunday as 7.

 

Also, if one day has to be removed every time remove 1 from the total sum.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.