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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ravi_dhiman
New Member

Calculating Order Fulfillment Time (in Days) Between Two Dates in Power BI

I have a table in Power BI with two columns: "Order Placed Date" and "Ship Date." I'm trying to calculate the "Order Fulfillment Time" in days, representing the time elapsed between the "Order Placed Date" and the "Ship Date."
Can anyone please guide me on how to calculate this metric within Power BI, specifically focusing on determining the number of days between these two dates?
Thank you in advance for your assistance!

1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi @ravi_dhiman ,

To accurately calculate the Order Fulfillment Time in days between the "Order Placed Date" and "Ship Date" in Power BI, while ensuring your calculation gracefully handles scenarios where there are blank or invalid dates, you can use the following DAX formula:

Order Fulfillment Time (Days) = 
IF (
ISBLANK(TableName[Order Placed Date]) || ISBLANK(TableName[Ship Date]),
BLANK(),
DATEDIFF(TableName[Order Placed Date], TableName[Ship Date], DAY)
)

#Replace TableName with the name of your table.
Key Features of This Formula:

Blank Handling, Accurate Time Calculation & Error Prevention.I hope the provided solution works for you

If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.

View solution in original post

3 REPLIES 3
Kedar_Pande
Super User
Super User

@ravi_dhiman 

You can try:

Order Fulfillment Time = 
DATEDIFF('TableName'[Order Placed Date], 'TableName'[Ship Date], DAY)

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

grazitti_sapna
Super User
Super User

Hi @ravi_dhiman ,

To accurately calculate the Order Fulfillment Time in days between the "Order Placed Date" and "Ship Date" in Power BI, while ensuring your calculation gracefully handles scenarios where there are blank or invalid dates, you can use the following DAX formula:

Order Fulfillment Time (Days) = 
IF (
ISBLANK(TableName[Order Placed Date]) || ISBLANK(TableName[Ship Date]),
BLANK(),
DATEDIFF(TableName[Order Placed Date], TableName[Ship Date], DAY)
)

#Replace TableName with the name of your table.
Key Features of This Formula:

Blank Handling, Accurate Time Calculation & Error Prevention.I hope the provided solution works for you

If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.

Thank you @grazitti_sapna  for your prompt assistance. I truly appreciate it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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