Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Solved! Go to Solution.
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.
Here is my test file for your reference.
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.
Here is my test file for your reference.
Hi @v-eachen-msft ,
Your solution works perfectly and it was exactly what I was looking for. Thanks for the help!
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...
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]))
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,
Hi @Anonymous ,
Try this measures:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!