<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Age in Years Months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4004037#M157413</link>
    <description>&lt;P&gt;I've got the data into Power BI.&amp;nbsp; Years in one column, months in another.&amp;nbsp; The trouble when I average for a year group the average is 12.41 years and 4.28 months.&amp;nbsp; The .41 years would need to be added to the months, if you are with me?&amp;nbsp; Is there no way to store years and months together in one column - and then an average would come out something like 12 years 7 months?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2024 12:10:56 GMT</pubDate>
    <dc:creator>duesouth</dc:creator>
    <dc:date>2024-06-21T12:10:56Z</dc:date>
    <item>
      <title>Age in Years Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4003873#M157410</link>
      <description>&lt;P&gt;I work in a school.&amp;nbsp; We test the pupils on their reading ages.&amp;nbsp; This is stored in our database/management information system in a odd format - e.g. 11/2 is 11 Years, 2 months; 15/10 is 15 years, 10 months.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm trying to get these reading ages into Power BI.&amp;nbsp; I've got a report out of our database, but am struggling to get the data into a table.&amp;nbsp; I tried splitting the columns in Excel first and having them in the format:&amp;nbsp; 11 years, 2 months but Power BI is picking that up as a text field.&amp;nbsp; I can't seem to change the format in power query - I just get errors on the whole column.&amp;nbsp; I'd like Power BI to give me average reading ages etc.&amp;nbsp; Any ideas how I can get this into Power BI in a useable format?&amp;nbsp; Does it need to be in a different format in Excel first?&amp;nbsp; I've spent this morning searching for solutions, but can't find anything.&amp;nbsp; Would appreciate any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Pupil ID&lt;/TD&gt;&lt;TD&gt;Reading Age&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;11 years, 2 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;13 years, 2 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;14 years, 7 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;17 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;15 years, 6 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;13 years, 2 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;16 years, 5 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;14 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;13 years, 8 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15 years, 6 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;10 years, 5 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;5 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;17 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;15 years, 10 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;17 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;17 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;TD&gt;17 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;16 years, 9 months&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;TD&gt;17 years, 0 months&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 21 Jun 2024 10:30:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4003873#M157410</guid>
      <dc:creator>duesouth</dc:creator>
      <dc:date>2024-06-21T10:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Age in Years Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4003885#M157411</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="698439" data-lia-user-login="duesouth" class="lia-mention lia-mention-user"&gt;duesouth&lt;/a&gt;&amp;nbsp;, You can try to split this Age column in excel using text to column function and convert the datatype into number and than try to load it into Power BI then&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 10:40:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4003885#M157411</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-06-21T10:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Age in Years Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4003893#M157412</link>
      <description>&lt;P&gt;Thanks for the reply.&amp;nbsp; Have two separate columns - one for year and one for month?&amp;nbsp; Would Power BI then average?&amp;nbsp; E.g. if I had&lt;/P&gt;&lt;P&gt;13 years, 1 month&lt;/P&gt;&lt;P&gt;13 years, 3 months&lt;/P&gt;&lt;P&gt;Would Power BI then give me an average for that "group" of 13 years, 2 months?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 10:43:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4003893#M157412</guid>
      <dc:creator>duesouth</dc:creator>
      <dc:date>2024-06-21T10:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Age in Years Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4004037#M157413</link>
      <description>&lt;P&gt;I've got the data into Power BI.&amp;nbsp; Years in one column, months in another.&amp;nbsp; The trouble when I average for a year group the average is 12.41 years and 4.28 months.&amp;nbsp; The .41 years would need to be added to the months, if you are with me?&amp;nbsp; Is there no way to store years and months together in one column - and then an average would come out something like 12 years 7 months?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 12:10:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4004037#M157413</guid>
      <dc:creator>duesouth</dc:creator>
      <dc:date>2024-06-21T12:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Age in Years Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4006016#M157414</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="698439" data-lia-user-login="duesouth" class="lia-mention lia-mention-user"&gt;duesouth&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'm using your original table and first create new columns to separate year and month:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Years = LEFT([Reading Age], SEARCH(" ", [Reading Age])-1)
Months = MID([Reading Age], SEARCH(",", [Reading Age])+2, LEN([Reading Age])-SEARCH(",", [Reading Age])-8)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then convert them to Whole number and put it into the view as an Average&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select slicer, here is my preview:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener nofollow noreferrer"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yongkang Hua&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 02:29:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Age-in-Years-Months/m-p/4006016#M157414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-24T02:29:33Z</dc:date>
    </item>
  </channel>
</rss>

