Forum Discussion
Anonymous
7 years agoNot 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. ...
- 7 years ago
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"
jdbuchanan71
7 years agoSuper 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"
Anonymous
7 years agoNot applicable
Thanks a lot it worked.