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
Wresen
Post Patron
Post Patron

Calendar Age between 2 dates

Hi and thanks for reading this.

 

I am trying to find a "correct" calender calculations for Age between 2 dates.

From what i can see "DATEDIFF('Table'[monthh];'Table'[Today];MONTH)" only changes Age when month changes , not taking the amount of days .

As you can see on the picture in yellow 69 days is still Age 2 but when we change month to 201912 it changes to Age 3

Is there any other way to calculate AGE between 2 dates ?

 

 

Age.png

 

1 ACCEPTED SOLUTION
EricHulshof
Solution Sage
Solution Sage

Not sure if i understand correctly but you want the difference in days? In that case you can use this code:

DATEDIFF('Table'[monthh];'Table'[Today];DAY)

 

As you can see the last part of a DATEDIFF function is the interval.

 


Quality over Quantity


Did I answer your question? Mark my post as a solution!


View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

What it should have displayed?

 

Hi @EricHulshof  and  @amitchandak 

 

I might run into a mind mine and did not think correctly 

 

i think i will solve my "problem" with the measure Erichulshof posted 

ROUNDUP(DATEDIFF('Table'[mont];TODAY();DAY)/30 ;0)
 
/thanks

 

EricHulshof
Solution Sage
Solution Sage

Not sure if i understand correctly but you want the difference in days? In that case you can use this code:

DATEDIFF('Table'[monthh];'Table'[Today];DAY)

 

As you can see the last part of a DATEDIFF function is the interval.

 


Quality over Quantity


Did I answer your question? Mark my post as a solution!


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.