<?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: clean data in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1270196#M40586</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="249591" data-lia-user-login="gio1082" class="lia-mention lia-mention-user"&gt;gio1082&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In Power Query, Add the below code as new Custom Column then filter by FALSE, you get as per your requirement.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; = if  Text.Start([DATA],1) = "S" then false else Text.Contains([DATA],"DOC") or Text.Length([DATA]) &amp;lt; 7&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2020 04:25:27 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2020-08-04T04:25:27Z</dc:date>
    <item>
      <title>clean data</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1269889#M40582</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data that I want to clean. I want to remove data from a row if its has "DOC" (ex 10265049DOC), and if less then 7 chracters (Ex: 12MM,4, 123m33) but keep anything data that&amp;nbsp; starts with an S&amp;nbsp; (S0644, S000012, S012)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 01:02:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1269889#M40582</guid>
      <dc:creator>gio1082</dc:creator>
      <dc:date>2020-08-04T01:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: clean data</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1270196#M40586</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="249591" data-lia-user-login="gio1082" class="lia-mention lia-mention-user"&gt;gio1082&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In Power Query, Add the below code as new Custom Column then filter by FALSE, you get as per your requirement.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; = if  Text.Start([DATA],1) = "S" then false else Text.Contains([DATA],"DOC") or Text.Length([DATA]) &amp;lt; 7&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 04:25:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1270196#M40586</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-08-04T04:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: clean data</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1271443#M40600</link>
      <description>&lt;P&gt;Just to clarify.&amp;nbsp; Are each of the values on separate rows?&amp;nbsp; Or are you trying to keep just parts of longer strings on each row?&amp;nbsp; If the former, does this approach work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Turn on the Formula Bar on the view tab (check the box)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Select the column with text values and, on the Transform tab, do a Format step (add prefix, lowercase, etc.).&amp;nbsp; It doesn't matter which one, as you are just using this to generate most of the code you'll need.&amp;nbsp; You'll get a step added like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= Table.TransformColumns(#"Changed Type",{{"TextColumn", Text.Lower, type text}})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Replace the Text.Lower part (or whatever function you chose) with the code shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= Table.TransformColumns(#"Changed Type",{{"TextColumn", each if Text.StartsWith(_, "S") then _ else null}})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will keep only the values that start with "S" and replace the rest with null.&amp;nbsp; You can added the expression as needed to get your desired logic.&amp;nbsp; "_" just refers to the value in that column on that row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 11:46:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/clean-data/m-p/1271443#M40600</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-08-04T11:46:39Z</dc:date>
    </item>
  </channel>
</rss>

