Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

DATEDIFF formula to return Years and Months

$
0
0

Hello,

 

I have a formula in Excel where i can calculate the Date Difference in years and months by using the interval "Y" for years and "YM" for months so my date difference would be diplayed as 3 years and 8 months.

 

In Power BI, I have found the correct formula to calculate the year so it returns 3 years

DATEDIFF([Hire Date],[Report Date],YEAR)

 

But how can i get the equivalent of the Excel "YM"?  If i do the same formula as above with the MONTH interval, i will get the total number of months from one date to another. However, i only want the number of months that are over the 3 years.  Is there anyway i can do this in BI?


Viewing all articles
Browse latest Browse all 213819

Trending Articles