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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Working Days on Aging Calculation

Hi,

I am trying to get a net working days for an aging calculation where you have a a filter date (report date).  The calculation works fine when I just do the days but when I add in the business days, I get this weird error.

 

Basically I want at 8/1, to get an accurate calculation for working days and total days for each order created.  

 

I have a Many to one relationship between createddate and the filter date.

 

Can anyone point me in the right direction?

 

bcobrien1977_0-1691068602153.png

 

Thanks
Brendan
Delivery Days Working =
CALCULATE(
    COUNTROWS ( 'Filter Dates' ),
DATESBETWEEN ( 'Filter Dates'[Date],  'Detail INC Aging'[Daterun], 'Detail INC Aging'[CreatedDate] - 1),
    'Filter Dates'[Business Day?]=1,
   
    ALL ( 'Detail INC Aging' ))
2 REPLIES 2
Anonymous
Not applicable

Thanks that is really helpful. What I struggle with is that the start date could be dynamic.  Someone could want to run it for 7/1 instead of 8/1 so how would I get that end date to change from 7/1 to 8/1 (while keeping the old date).

Thanks

amitchandak
Super User
Super User

@Anonymous , You can use networkdays

 

measure =

calculate(networkdays(min(Table[Stare]), max(Table[End Date]), 1)

 

Column=

calculate(networkdays((Table[Stare]), (Table[End Date]), 1)

 

Power BI - Business day with and without using DAX Function NETWORKDAYS: https://www.youtube.com/watch?v=Qs03ZZXXE_c
https://medium.com/@amitchandak/power-bi-dax-function-networkdays-5c8e4aca38c

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.