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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
ArchStanton
Impactful Individual
Impactful Individual

Calculate Age of Items using fixed historic and future dates

Hi,

I've attached a link to my pbix file with some dummy data. Is there a way I can add just the pbix file?

 

https://www.dropbox.com/scl/fi/z2c9pykget7z4gutuhvsw/Age-Analysis.pbix?rlkey=wvj8rimvy6r00bccszpp9pl...

 

My aim is to create a calculated column that how many items are going to be =>18mths as at 1st Apr 2024

 

I have already calculated this using todays date here:

Age in Mths = DATEDIFF(
                   Data[Created On], 
                   NOW(),MONTH)

 

I have tried using DATEDIFF with "01/04/2024" but I was getting error messages about Text frmat and i should use FORMAT or VALUES.

 

This formaula does work but it returns 4 months for every row? My plan was to add this onto the Age in Mths column.

 

Once all this is done I would like to create a second column, replicating everything in the original column but factoring NETWORKDAYS & Bank Holidays into a second Age in Days2 and Age in Months2 column.

 

Can any show me where I'm going wrong?

Thanks

 

2 REPLIES 2
christinepayton
Super User
Super User

You need to format the date you're comparing to in a very specific way, see the example here:

https://dax.guide/datediff/

 

The double quotes is interpreted as text, so it can't use it the way you've entered it. 

Thank you, I'll give this a go

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.