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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
earter
Regular Visitor

working day of year

 I need help creating a calculated column on my calendar dimension table that tells me on each day the working day number in the year. This is so I can have parity between years on average daily sales calculations.

 

I can get the day number of the year, but can't figure out how to only have it count working days. I have indicators for holiday, weekend, and workingday.

 

Thanks for any help in advance.

 

1 ACCEPTED SOLUTION
CheenuSing
Community Champion
Community Champion

Hi @earter

 

Please check out

 

http://sqlblog.com/blogs/alberto_ferrari/archive/2011/01/19/working-days-computation-in-powerpivot.a...

 

If it work for you please accept this as solution and also give KUDOS.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
CheenuSing
Community Champion
Community Champion

Hi @earter

 

Please check out

 

http://sqlblog.com/blogs/alberto_ferrari/archive/2011/01/19/working-days-computation-in-powerpivot.a...

 

If it work for you please accept this as solution and also give KUDOS.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

This didn't quite get me what I needed because when you span years it just keeps counting.

 

I adjusted the formula from Alberto's blog to this which now works as intended:

 

CALCULATE(SUM('Calendar'[IsWorkDay]),
FILTER('Calendar',
'Calendar'[DateKey] <= EARLIER('Calendar'[DateKey]) &&
'Calendar'[YearKey] = EARLIER('Calendar'[YearKey])))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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