cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CristianConto New Member
New Member

Average NetworkDays

Hello all.

I've been trying to create this function for last two days... I'm getting crazy....

 

O tried a lot of different ways using DAX but nothing is working as expected here..

I need to calculate the average networkdays (including holidays). So, here is an example of my table, and I have a join to a CalendarTable by OrderDate. This table has multiple orders, each order has a status assigned. I need to create this average for the first date with Status 1 or 2 and the first date of Status 4.
I may have all status in the same day (in this case the Delta would be 0) or and I can have the Status 1 in one week and two weeks later the status 4, in this case, i need to calculate the network days (Excluding Saturday, Sunday and Holidays if it has).

 

Any Idea about how to make it work?

Regards.

 

OrderNumberOrderDateStatus
11/9/2018Status 1
11/9/2018Status 2
11/11/2018Status 3
11/14/2018Status 4
21/20/2018Status 1
21/21/2018Status 2
21/22/2018Status 3
21/23/2018Status 4
21/24/2018Status 6
21/25/2018Status 7
21/26/2018Status 8
31/18/2018Status 2
31/19/2018Status 3
31/20/2018Status 3

 

image.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Average NetworkDays

@CristianConto,

 

You may try to select Pivot Column in Query Editor, then use AVERAGEX Function in DAX.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Average NetworkDays

@CristianConto,

 

You may try to select Pivot Column in Query Editor, then use AVERAGEX Function in DAX.

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