Calculate Tenure in Power Query Customer Column

porter444

New member
Joined
Sep 8, 2016
Messages
14
Reaction score
0
Points
0
Location
Birmingham, AL
Excel Version(s)
Excel 2016 MSO 64 Bit
Need to calculate employee tenure in a data set I'm working with, and would like to handle in Power Query. I have a column with the employee hire date.

The formula in Excel would be something like this... =(NOW()-[Hire Date])/365

Any help would be appreciated; thanks in advance!
 
It's giving me an error. I tried adding a custom column [Now] with just the =DateTime.LocalNow() and then adding another column [Tenure] with =([Now]-[Hire Date])/365. The [Tenue] column has the error. Is this data type issue?
 
Yes, it would be. What's the data type of the Hire Date column?

You might try either of these:
=(DateTime.LocalNow()-DateTime.From([Hire date]))/365

Or
=(Number.From(DateTime.LocalNow()-Number.From([Hire date]))/365
 
Back
Top