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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ligalbert
Helper I
Helper I

Difference between two dates

I want to get the difference between first transaction and recent transaction How can I create a measure to do that and if i can get the answer in months it would be ideal 

date difference.PNG

  bvet

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @ligalbert 

 

You currently have 3 columns in the table visual, and want to add the date difference in month in the table visual as well, right? Here is one way

Diff=DATEDIFF(MAX(yourTable[First Order Date]),MAX(yourTable[Recent Order Date]),MONTH)

 

View solution in original post

1 REPLY 1
Vera_33
Resident Rockstar
Resident Rockstar

Hi @ligalbert 

 

You currently have 3 columns in the table visual, and want to add the date difference in month in the table visual as well, right? Here is one way

Diff=DATEDIFF(MAX(yourTable[First Order Date]),MAX(yourTable[Recent Order Date]),MONTH)

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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