Forum Discussion
calculate employee position Duration
- 4 years ago
Anonymous , That will not add up
New column =
var _min = minx(filter(Table, [Employee Name] = earlier([Employee Name]) && [Effective from] > earlier([Effective from])), [Effective from])var _diff = datediff([Effective from], coalesce(_min, today()), month)
return Quotient(_diff ,12) & " Years " & Mod(_diff ,12) & " Months"
Anonymous ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
want to check why this did not work
New column =
var _min = minx(filter(Table, [Employee Name] = earlier([Employee Name]) && [Effective from] > earlier([Effective from])), [Effective from])
return
datediff([Effective from], coalesce(_min, today()), month)/12.0
- Anonymous4 years agoNot applicable
Hi amitchandak
it worked thanks but the output is showing like 8.02 and 2.08. i want this like 8years and 2months in this format
Thanks again if you help me to get this format- amitchandak4 years ago
Super User
Anonymous , That will not add up
New column =
var _min = minx(filter(Table, [Employee Name] = earlier([Employee Name]) && [Effective from] > earlier([Effective from])), [Effective from])var _diff = datediff([Effective from], coalesce(_min, today()), month)
return Quotient(_diff ,12) & " Years " & Mod(_diff ,12) & " Months"- Anonymous4 years agoNot applicable
it is throwing this error.