Tableau: How to get number of years from number of months?

40 Views Asked by At

I am trying to get the number of years of tenure from the number of Tenure months in Tableau with a function? can someone help me? Thank you

enter image description here

1

There are 1 best solutions below

1
Pubudu On

If you need to get the number of years and number of months, you can create a new calculated field using the below

STR(INT([Tenure Months]/12)) +' Years '+ Str([Tenure Months]%12) + ' Months'

If you just need the number of years in float, you can create a new calculated field using the below

[Tenure Months]/12