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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate the Number of Working Days Left in Current Month

Hi All, 

 

I have a calendar table where I'm using a calculated column to calculate the number of working days in each month. 

 

I need a formula to calculate the no. of working days left in the current month and to return the no. of working days in all the other months.

 

So for example, in March, I have a total of 21 working days and based on today's date, I should have 3 working days left. I need this formula to return 3 for March and the total no. of working days for Jan, Feb, April and so on. 

 

Thanks!

 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use COUNTROWS() function to calculate the rest working days.

Current Month =
IF (
    FORMAT ( TODAY (), "mmmm" ) = SELECTEDVALUE ( 'Table'[Column] ),
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Date] >= TODAY ()
                && NOT ( WEEKDAY ( 'Table'[Date], 1 ) IN { 1, 7 } )
        )
    ),
    [Working Day]
)

Here is the result.

3-1.PNG

Here is my test file for your reference.

 

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

7 REPLIES 7
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use COUNTROWS() function to calculate the rest working days.

Current Month =
IF (
    FORMAT ( TODAY (), "mmmm" ) = SELECTEDVALUE ( 'Table'[Column] ),
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Date] >= TODAY ()
                && NOT ( WEEKDAY ( 'Table'[Date], 1 ) IN { 1, 7 } )
        )
    ),
    [Working Day]
)

Here is the result.

3-1.PNG

Here is my test file for your reference.

 

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

Hi @v-eachen-msft , 

 

Your solution works perfectly and it was exactly what I was looking for. Thanks for the help!

amitchandak
Super User
Super User

If you have to work date

remaining Days = sumx(filter(Date,Date[Date]>= today() && Date[Date]<= eomonth(today(),0)),Date[Working Days])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , 

 

Your formula returns the no. of working days left in the current left, but I also need to it to return the no. of days left in all the other months. For March, it correctly returns 3 and I need it to return 21 for January, 20 for Feb, 20 for April...

Working Days Left.PNG

Please see attached screenshot. 

 

 
 

Try

if(month(today()) = month(Date[Date]),
sumx(filter(Date,Date[Date]>= today() && Date[Date]<= eomonth(today(),0)),Date[Working Days]),
sumx(Date,Date[Working Days]))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , 

 

If I use a measure, IF statement won't let me reference my date column in my calendar table and if I use a calculated column I get the following result, 

 

Working Days Left.PNG

camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this measures:

 

WorkingDays = CALCULATE(COUNT('Date'[Date]); WEEKDAY('Date'[Date]; 1) in {2;3;4;5;6})
 
WorkingDaysLeft = CALCULATE(COUNT('Date'[Date]); FILTER('Date'; WEEKDAY('Date'[Date]; 1) in {2;3;4;5;6} && 'Date'[Date] >= TODAY() ))
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors