Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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!
Solved! Go to Solution.
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.
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
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.