Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I'm trying to find how to create a weekday count for dates in a start date and end date column. I have used Dattedif for the total days between the dates, however I only want the working days, Monday to Friday. Please can you help me. Many thanks.
Solved! Go to Solution.
Hi @Anonymous ,
I have created dummy data for test:
In this case, we need to firstly create a new Calendar table:
Calendar = CALENDAR(MIN('Table'[Start Date]),MAX('Table'[End Date]))
Then create a measure to calculate the count of working days:
Working Days =
CALCULATE (
COUNTROWS ( 'Calendar' ),
FILTER (
'Calendar',
[Date] >= MAX ( 'Table'[Start Date] )
&& [Date] <= MAX ( 'Table'[End Date] )
&& WEEKDAY ( [Date], 2 ) IN { 1, 2, 3, 4, 5 }
)
)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I have created dummy data for test:
In this case, we need to firstly create a new Calendar table:
Calendar = CALENDAR(MIN('Table'[Start Date]),MAX('Table'[End Date]))
Then create a measure to calculate the count of working days:
Working Days =
CALCULATE (
COUNTROWS ( 'Calendar' ),
FILTER (
'Calendar',
[Date] >= MAX ( 'Table'[Start Date] )
&& [Date] <= MAX ( 'Table'[End Date] )
&& WEEKDAY ( [Date], 2 ) IN { 1, 2, 3, 4, 5 }
)
)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Here a similar thread. You can find various other links in there that I am sure will be helping you!
Working days between two dates - simply! - Microsoft Power BI Community
And here a video with a function in Power Query:
PowerBI: Calculate business/working days between two dates in a new column - YouTube
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |