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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

need to get count of working weekdays till now in a year using dax

HI,

need to get count of working weekdays till now in a year using dax 

 

help is appreciated.

 

Regards,

Raju

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create calendar table, calculated column and measure like DAX below.

 

Table: Calendar=CALENDAR((YEAR(TODAY()),1,1), TODAY())
 
Column: If Weekday= IF(NOT WEEKDAY(calendar[Date]) IN {1,7}, 1, BLANK())
 
Measure: Total workdays = CALCULATE(COUNT(Calendar[Date]),FILTER(Calendar, Calendar[If Weekday]=1))

 

You can refer to the similar case: https://community.powerbi.com/t5/Desktop/DATEDIFF-Working-Days/td-p/130662 .

 

Best Regards,

Amy

 

Community Support Team _ Amy

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

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create calendar table, calculated column and measure like DAX below.

 

Table: Calendar=CALENDAR((YEAR(TODAY()),1,1), TODAY())
 
Column: If Weekday= IF(NOT WEEKDAY(calendar[Date]) IN {1,7}, 1, BLANK())
 
Measure: Total workdays = CALCULATE(COUNT(Calendar[Date]),FILTER(Calendar, Calendar[If Weekday]=1))

 

You can refer to the similar case: https://community.powerbi.com/t5/Desktop/DATEDIFF-Working-Days/td-p/130662 .

 

Best Regards,

Amy

 

Community Support Team _ Amy

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

Sean
Community Champion
Community Champion

Hi @Anonymous

You would need to have a 'Date'[IsWorkingDay] column in your calendar table.

'Date'[IsWorkingDay] = NOT WEEKDAY( 'Date'[Date] ) IN { 1,7 }

Find out how to do all this here:

https://www.sqlbi.com/articles/counting-working-days-in-dax/ 

 

Good Luck! 🙂

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors