Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
Need your help in calculating number of days from 2 dates exluding Saturday and Sunday in query editor.
Thanks and Regards
Abhijit
Solved! Go to Solution.
@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
@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
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!
Thanks, Can you please help me with the logic.
Regards
Abhijit Mishra
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 37 | |
| 31 | |
| 30 |