Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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 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
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
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 51 | |
| 42 | |
| 32 | |
| 26 | |
| 24 |
| User | Count |
|---|---|
| 131 | |
| 118 | |
| 57 | |
| 45 | |
| 43 |