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 exclude weekends (Sat and Sun) while calculating number of days in query editor

Hi All,

 

Need your help in calculating number of days from 2 dates exluding Saturday and Sunday in query editor.

 

 

Thanks and Regards

Abhijit

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/How-to-calculate-net-working-days-Step-by-Step/td-p/232478

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/How-to-calculate-net-working-days-Step-by-Step/td-p/232478

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JoHo_BI
Responsive Resident
Responsive Resident

Add a calculated column to your date table to return 1 for a weekday and 0 for a weekend, then add the new calculated column based on the dates you provide.

 

Hope that helps! 

Anonymous
Not applicable

Thanks, Can you please help me with the logic.

 

Regards

Abhijit Mishra

JoHo_BI
Responsive Resident
Responsive Resident

Assuming you have a date table, add a calculated column:

 

IsWeekday = WEEKDAY('Date'[Date],2) <= 5

 

Then in your measures you can use this as logic, for example: 

 

Sales = CALCULATE(SUM(Sales[SalesAmount]), 'Date'[IsWeekday] = TRUE())

It doesn't exclude a gap.

I also tried this  but doesn't work if we require use x-axis only continuous.

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.