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
Anonymous
Not applicable

Calculate Date Difference

Hi All,

 

I have the date in my data, need to find the age as on day in Bewlow Format.

 

Sample 

Date: 05/17/2018

 

Age as on Day : 1 Years, 0 Months (Format)

 

Regards.

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Something like this?

Measure = 
VAR TodaysDate = TODAY()
VAR MonthDiff = DATEDIFF ( SELECTEDVALUE ( Table1[date] ), TodaysDate, MONTH )
RETURN INT ( DIVIDE ( MonthDiff,12 ) ) & " years, " & MOD ( MonthDiff,12 ) & " months"

datediff.jpg

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

Something like this?

Measure = 
VAR TodaysDate = TODAY()
VAR MonthDiff = DATEDIFF ( SELECTEDVALUE ( Table1[date] ), TodaysDate, MONTH )
RETURN INT ( DIVIDE ( MonthDiff,12 ) ) & " years, " & MOD ( MonthDiff,12 ) & " months"

datediff.jpg

Anonymous
Not applicable

Thanks a lot it worked.

Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=INT((TODAY()-[Date])/365)&"years, "&INT(MOD((TODAY()-[Date]),1))&" months"

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.