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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Seif949
New Member

Calculate Average Per Month for Open Orders

 I am having difficulty producing a line chart that shows the average number of days between order date and last ship date for orders that have yet to be completely shipped.  An order may have multiple records with different shipping dates but I'm only interested in counting orders that have not completely shipped by the end of the each month. 

 

The data is contained in a 'DateTable' and 'OrderTable'. 'OrderTable' contains [Order Number], [Part Number], [Order Date], [Ship Date, and [Days to Ship]. There is an active relationship between 'DateTable'[Date]:'OrderTable'[Order Date] and an inactive relationship between 'DateTable'[Date]:'OrderTable'[Ship Date].

 

Thank you so much for any and all help!

 

Here is an example of the OrderTable and a corresponding Excel line chart.

 

Seif949_1-1720020017801.png

 

Order NumberPart NumberOrder DateShip DateDays to ship
1141/3/2024  
1291/3/20243/23/202480
1241/3/20243/23/202480
2251/13/20245/11/2024119
2441/13/20243/20/202467
2151/13/20244/29/2024107
2421/13/20244/10/202488
2151/13/20245/3/2024111
3252/4/20245/11/202497
4382/6/20243/6/202429
4182/6/20242/28/202422
4202/6/20245/24/2024108
4302/6/20245/29/2024113
5122/21/20245/4/202473
5462/21/20244/5/202444
5272/21/20243/7/202415
5262/21/2024  
5392/21/20244/19/202458
5242/21/20243/4/202412
2 REPLIES 2
Anonymous
Not applicable

Hi @Seif949 

 

The screenshot you provided is less detailed.

 

Can you explain the logic of your calculation and how you arrived at the expected result?

 

Regards,

Nono Chen

I appreciate your patience and thank you for your time!

 

Order NumberPart NumberOrder Date Ship Date Days to ship
1141/3/2024    
1291/3/2024 3/23/2024 80
1241/3/2024 3/23/2024 80
2251/13/2024 5/11/2024 119
2441/13/2024 3/20/2024 67
2151/13/2024 4/29/2024 107
2421/13/2024 4/10/2024 88
2151/13/2024 5/3/2024 111
3252/4/2024 5/11/2024 97
4382/6/2024 3/6/2024 29
4182/6/2024 2/28/2024 22
4202/6/2024 5/24/2024 108
4302/6/2024 5/29/2024 113
5122/21/2024 5/4/2024 73
5462/21/2024 4/5/2024 44
5272/21/2024 3/7/2024 15
5262/21/2024    
5392/21/2024 4/19/2024 58
5242/21/2024 3/4/2024 12

 

At the end of each month, I need to calculate the time to ship for each order that hasn't been completely shipped I appreciate your patience and thank you for your time! by the end of the month in question. For example, Order 1 was place on 1/03 and it was not completely shipped out by the end of January so it had a pending age of 28 days at the end of January and then 57 days at the end of February and so on. If an order is completely shipped, then I am no longer interested in it but it should appear in the calculations for the months prior to its final ship date.  

 

Using the data table above, the table below might help explain what I'm trying to do. I am interested in the average for each month.

 

 Order Age (Days)Order Age (Days) Order Age (Days) Order Age (Days) Order Age (Days)
Order Number1/31/20242/29/2024 3/31/2024 4/30/2024 5/31/2024
12857 88 118 149
21847 78 108  
3 25 56 86  
4 23 54 118  
5 8 39 69 100
Average2332 63 99.8 124.5

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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