cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 78 members 1,348 guests
Please welcome our newest community members: