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.
Hi Gurus,
I would like to create a calculated column to get the number of working days between two dates that are in a specific month.
For example:
Date 1
27-August-2023
Date 2
8-September-2023
Working Days within the two days in September = 5 (Sun-Thu work week)
Appreciate your help 🙂
Solved! Go to Solution.
Hi @Anonymous
You can refer to the following measure
Column =
VAR a =
ADDCOLUMNS (
CALENDAR ( [Column1], [Column2] ),
"Workday", WEEKDAY ( [Date], 1 ),
"Month", MONTH ( [Date] ),
"Year", YEAR ( [Date] )
)
RETURN
COUNTROWS (
FILTER (
a,
[Workday] < 6
&& [Year] = YEAR ( [Column2] )
&& [Month] = MONTH ( [Column2] )
)
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
You can refer to the following measure
Column =
VAR a =
ADDCOLUMNS (
CALENDAR ( [Column1], [Column2] ),
"Workday", WEEKDAY ( [Date], 1 ),
"Month", MONTH ( [Date] ),
"Year", YEAR ( [Date] )
)
RETURN
COUNTROWS (
FILTER (
a,
[Workday] < 6
&& [Year] = YEAR ( [Column2] )
&& [Month] = MONTH ( [Column2] )
)
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
You can use networkdays function.
https://learn.microsoft.com/en-us/dax/networkdays-dax
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
78 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |