cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## How to calculate the difference between between two date columns?

I want to calcualte this KPI(measure DAX) in day - quarter-month-year

This is Formula :

Internal order processing time = Order[Order purchased date] - Order[order delivered date]

Thank

1 ACCEPTED SOLUTION
Super User

I would create new columns for day, month, quarter and year, like

``````Internal order processing time ( days) =
DATEDIFF( Order[Order purchased date], Order[order delivered date], DAY)
Internal order processing time ( months) =
DATEDIFF( Order[Order purchased date], Order[order delivered date], MONTH)``````

You could then create measure to show average time, min / max etc.

2 REPLIES 2
Super User

I would create new columns for day, month, quarter and year, like

``````Internal order processing time ( days) =
DATEDIFF( Order[Order purchased date], Order[order delivered date], DAY)
Internal order processing time ( months) =
DATEDIFF( Order[Order purchased date], Order[order delivered date], MONTH)``````

You could then create measure to show average time, min / max etc.

Frequent Visitor

Voila! that work. I'm grateful 🙂