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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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