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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.