cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Dbertelsen
Frequent Visitor

Average difference in shipment processing (days)

Hi everyone,

 

I have this little conundrum which I simply cannot figure out how to solve - even though it may appear fairly easy!?

 

I have to calculate and visualise the average processing days it takes from when an order is placed, till it is shipped to the customer.

So, I have calculated a third column which is basically the (Excel) NetWorkDays formula (calculates the days between two dates, exluding weekends).

So for instance an order that was placed on 01 Nov. 2022 and shipped on 02 Nov. 2022 would have a net work days of 2 days.

An order that was processed and shipped on the same day would have a net work day of = 1.

 

So, for all orders coming in, I have a column for this calculation, where most of them will show = 1 

 

 

Date Order PlacedDate Order ShippedProcessing Days
01/11/202202/11/20222
01/11/202201/11/20221
01/11/202201/11/20221

 

I want the average for this, dynamically in PowerBI when looking on a specific period (usually monthly).

 

Ultimately this column will contain a lot of 1's and 2's so calculating the average for a specific month shouldnt be that much of an issue?

 

But this doesn't seem to work.

 

Does anyone have any ideas?

 

 

1 ACCEPTED SOLUTION

@Dbertelsen I just copy-pasted your sample information. If you are not getting that option change the Processing days field to a whole number.

View solution in original post

4 REPLIES 4
v-jianboli-msft
Community Support
Community Support

Hi @Dbertelsen ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dbertelsen
Frequent Visitor

That's the problem - I don't get that option.

I think PowerBI treats the column "Processing Days" as a text/string and not a number? 

@Dbertelsen I just copy-pasted your sample information. If you are not getting that option change the Processing days field to a whole number.

AbbasG
Memorable Member
Memorable Member

@Dbertelsen did you tired using the aggregation(average) on the processing days field?

AbbasG_0-1667316068746.png

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors