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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
CristianConto
Regular Visitor

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
v-chuncz-msft
Community Support
Community Support

@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
v-chuncz-msft
Community Support
Community Support

@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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.