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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Klein_Hartje
Frequent Visitor

How to calculate the difference between between two date columns?

Hi everyone , Please

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]

 

Klein_Hartje_0-1654010762309.png

 Thank

 

 

 

1 ACCEPTED SOLUTION
johnt75
Super User
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.

View solution in original post

2 REPLIES 2
johnt75
Super User
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.

Voila! that work. I'm grateful 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors