Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don'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.

Reply
LCL
Regular Visitor

Work Days out of a Month

Hi Everyone,

 

Im self teachign myself to use powr BI and have been able to do several things now, but I am not able to find a formula I need.

I have a column which shows the month and the year, I need a formaul that will read that month/year and come back with how many days in that given month were "workign days"

 

LCL_1-1658865002001.png

Thats the column I have I need for it to show next to it for example "22" (If there were 22 working days on February, and "25" if there were 25 working dasy on January an

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @LCL 

 

You can try the following methods. Create a new date table.

Table:

Date = CALENDAR(DATE(2022,1,1),DATE(2022,12,31))

Column:

Weekday = WEEKDAY([Date],2)
Month = FORMAT([Date],"mmmm")
days =
CALCULATE (
    COUNT ( 'Date'[Date] ),
    FILTER ( 'Date', [Weekday] <= 5 && [Month] = EARLIER ( 'Date'[Month] ) )
)
working days = [Month]&[days]

vzhangti_0-1659091683686.png

If your form is similar to this. You can join two tables with Month.

vzhangti_3-1659091785988.png

vzhangti_2-1659091747165.png

vzhangti_4-1659091906995.png

Is this the result you were hoping for?

 

Best Regards,

Community Support Team _Charlotte

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

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @LCL 

 

You can try the following methods. Create a new date table.

Table:

Date = CALENDAR(DATE(2022,1,1),DATE(2022,12,31))

Column:

Weekday = WEEKDAY([Date],2)
Month = FORMAT([Date],"mmmm")
days =
CALCULATE (
    COUNT ( 'Date'[Date] ),
    FILTER ( 'Date', [Weekday] <= 5 && [Month] = EARLIER ( 'Date'[Month] ) )
)
working days = [Month]&[days]

vzhangti_0-1659091683686.png

If your form is similar to this. You can join two tables with Month.

vzhangti_3-1659091785988.png

vzhangti_2-1659091747165.png

vzhangti_4-1659091906995.png

Is this the result you were hoping for?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@LCL , There new function provided by power bi networkdays

https://docs.microsoft.com/en-us/dax/networkdays-dax

 

do you have month start and end date in you table

 

If you have date then

 

Start Date of month = eomonth([Date],-1)+1

 

end Date of month = eomonth([Date], 0)

 

Old method

How to calculate Business Days/ Workdays, with or without date table: https://youtu.be/Qv4wT8_P-AA

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks but thats the problem, I dont have the dates on the table only the month 😞

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.