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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ctedesco3307
Resolver II
Resolver II

Number of Months between a date and current month

Want to create a rolling ytd column  to show the number of months between a start date and today.

Need to include the year also - so for example the first row would return 12 not 0 b/c start date is in 2021 

 

Thanks in advace! 

ctedesco3307_0-1660229037642.png

 

1 ACCEPTED SOLUTION
2 REPLIES 2
AlexisOlson
Super User
Super User

Another simple method:

Date.Year([EndDate]) * 12 + Date.Month([EndDate]) - Date.Year([StartDate]) * 12 - Date.Month([StartDate])
ctedesco3307
Resolver II
Resolver II

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors