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
WJ876400
Helper IV
Helper IV

Date Difference

Hi

 

I want to find the difference between a past date and todays date, which I have done with this formula 

 

DATEDIFF([REVIEW],TODAY(),MONTH)
 
How  ever as you can see below there are some ID's that have a return date and I want to do the months between off that date instead of the review.
 
IDReviewReturn DateMonths Between
101/10/2021  
206/05/202105/03/2022 
324/03/2022  
417/06/2022  
501/05/202112/12/2021 

 

So I want to do months between the review date and today if the return date is blank. If it is not blank do the months between the return date and today.

 

Hope that makes sense any help is appreciated

 

thanks

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

Hey @WJ876400 ,

 

Here, try this:

 

MonthBetweenColumn = 
if('Table'[Return Date] <> BLANK(),DATEDIFF('Table'[Return Date],TODAY(),MONTH),DATEDIFF('Table'[Review],TODAY(),MONTH))

Are you looking for this?

PC2790_0-1655290104014.png

 

View solution in original post

2 REPLIES 2
WJ876400
Helper IV
Helper IV

@PC2790 thank you very much it worked!

PC2790
Community Champion
Community Champion

Hey @WJ876400 ,

 

Here, try this:

 

MonthBetweenColumn = 
if('Table'[Return Date] <> BLANK(),DATEDIFF('Table'[Return Date],TODAY(),MONTH),DATEDIFF('Table'[Review],TODAY(),MONTH))

Are you looking for this?

PC2790_0-1655290104014.png

 

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.