<?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: Alphanumeric column error in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029733#M132012</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="151247" data-lia-user-login="collinsg" class="lia-mention lia-mention-user"&gt;collinsg&lt;/a&gt;&amp;nbsp;for your support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this code is too complicated for me.&lt;/P&gt;&lt;P&gt;In the image that I shared, the duration column has both numeric and alphanumeric dates like - the normal month date in DDYYMM Format as 202305 &amp;amp; YTD format like YTD 05-22 i.e. YTD MM YY.&lt;/P&gt;&lt;P&gt;Now to proceed with PBI, I have to normalise this column separately, I suppose.&lt;/P&gt;&lt;P&gt;As soon as I upload the sheet in PBI, the rows with YTD shows error.&lt;/P&gt;&lt;P&gt;How do I normalise this YTD. Or if I take it in different column, then whats the procedure.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2024 08:39:23 GMT</pubDate>
    <dc:creator>pooramit4</dc:creator>
    <dc:date>2024-07-08T08:39:23Z</dc:date>
    <item>
      <title>Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4022520#M131791</link>
      <description>&lt;P&gt;I am PBI beginer. I have a dataset in excel with Duration column as Alphanumeric. Below is the snapshot&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When loading it to Power BI, getting error for YTD.&lt;/P&gt;&lt;P&gt;Is there any other way to write this YTD so that I do not get the error and the sheet is uploaded in proper manner.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 09:19:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4022520#M131791</guid>
      <dc:creator>pooramit4</dc:creator>
      <dc:date>2024-07-03T09:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4022557#M131794</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="769878" data-lia-user-login="pooramit4" class="lia-mention lia-mention-user"&gt;pooramit4&lt;/a&gt;&amp;nbsp;transform Duration column to text before loading.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 09:31:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4022557#M131794</guid>
      <dc:creator>AlienSx</dc:creator>
      <dc:date>2024-07-03T09:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4022783#M131799</link>
      <description>&lt;P&gt;Good day pooramit4,&lt;/P&gt;
&lt;P&gt;As AlienSx suggests it would be preferable to prepare the data upstream. If you have to deal with the data in Power Query you can transform the Duration column as follows,&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Check each entry to see if it starts with YTD.&lt;/LI&gt;
&lt;LI&gt;Transform the entry if it starts with YTD.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Here is sample code.&lt;/P&gt;
&lt;PRE&gt;let&lt;BR /&gt;  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMjYwVdJRCijKTylNLsnMz1OK1aGeeGSIi4KBqa6R0eCUigUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Duration = _t, Area = _t]),&lt;BR /&gt;  #"Transform YTD" = Table.TransformColumns(Source, {{"Duration", each if Text.StartsWith(_,"YTD") then "20" &amp;amp; Text.Range(_,7,2) &amp;amp; Text.Range(_,4,2) else _, type text}})&lt;BR /&gt;in&lt;BR /&gt;  #"Transform YTD"&lt;/PRE&gt;
&lt;P&gt;giving...&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 11:34:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4022783#M131799</guid>
      <dc:creator>collinsg</dc:creator>
      <dc:date>2024-07-03T11:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029733#M132012</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="151247" data-lia-user-login="collinsg" class="lia-mention lia-mention-user"&gt;collinsg&lt;/a&gt;&amp;nbsp;for your support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this code is too complicated for me.&lt;/P&gt;&lt;P&gt;In the image that I shared, the duration column has both numeric and alphanumeric dates like - the normal month date in DDYYMM Format as 202305 &amp;amp; YTD format like YTD 05-22 i.e. YTD MM YY.&lt;/P&gt;&lt;P&gt;Now to proceed with PBI, I have to normalise this column separately, I suppose.&lt;/P&gt;&lt;P&gt;As soon as I upload the sheet in PBI, the rows with YTD shows error.&lt;/P&gt;&lt;P&gt;How do I normalise this YTD. Or if I take it in different column, then whats the procedure.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 08:39:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029733#M132012</guid>
      <dc:creator>pooramit4</dc:creator>
      <dc:date>2024-07-08T08:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029750#M132015</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="532285" data-lia-user-login="AlienSx" class="lia-mention lia-mention-user"&gt;AlienSx&lt;/a&gt;&amp;nbsp;for you support.&lt;/P&gt;&lt;P&gt;But its not working as the column has both dates in&amp;nbsp;&lt;SPAN&gt;DDYYMM Format as 202305 &amp;amp; YTD format like YTD 05-22 i.e. YTD MM YY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any other way?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 08:44:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029750#M132015</guid>
      <dc:creator>pooramit4</dc:creator>
      <dc:date>2024-07-08T08:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029762#M132017</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="769878" data-lia-user-login="pooramit4" class="lia-mention lia-mention-user"&gt;pooramit4&lt;/a&gt;&amp;nbsp;. To encourage Community Members to assist you with your question, please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then share a file’s URL.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523/highlight/true#M607150" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523/highlight/true#M607150&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 08:47:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4029762#M132017</guid>
      <dc:creator>foodd</dc:creator>
      <dc:date>2024-07-08T08:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Alphanumeric column error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4032019#M132117</link>
      <description>&lt;P&gt;Good morning&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="769878" data-lia-user-login="pooramit4" class="lia-mention lia-mention-user"&gt;pooramit4&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;To cater for your data being numeric and alphanumeric I've added an initial conversion to text - Text.From(_), I finish by converting text values back to numeric - Value.FromText(...). If you add the following step to your Power Query query your data it will produce an output of numeric dates. Replace #"Previous Step" with the name of your previous step.&lt;/P&gt;
&lt;PRE&gt;= Table.TransformColumns(&lt;BR /&gt;  #"Previous Step", &lt;BR /&gt;  {{"Duration", &lt;BR /&gt;    each if Text.StartsWith(Text.From(_),"YTD") &lt;BR /&gt;    then Value.FromText("20" &amp;amp; Text.Range(_,7,2) &amp;amp; Text.Range(_,4,2)) &lt;BR /&gt;    else _, type text&lt;BR /&gt;  }})&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;This...&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;gives...&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 07:56:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Alphanumeric-column-error/m-p/4032019#M132117</guid>
      <dc:creator>collinsg</dc:creator>
      <dc:date>2024-07-09T07:56:16Z</dc:date>
    </item>
  </channel>
</rss>

