Welcome to Excel Jet Consult blog post. In this tutorial, we will learn how to calculate Age in years and month in Power Query. Let’s get started
In the caption below, we have our data loaded into the Power Query editor
In From Date & Time group of the Add Column tab, click on Date drop-down and select Age
In the above caption, we have values in Time Data type.
Next, click on the Time icon and select Whole Number
In the above caption, we have Age in number. However, we want to know how many years and month each of the persons have spent.
To do that: In the Add Column tab, click on Custom Column
In the Custom Column dialogue box, we have Age in Years & Month as column name
In the Custom column formula: execute =[Age]/365
Click OK
In the caption below, we can see that the first person has lived for 32 years 1 month and few days
That’s how to calculate Age in Power Query