<?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: Is there a way to extract certain words out? in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254436#M113236</link>
    <description>&lt;P&gt;In step SplitTextOnDigits, you should use the name of the previous step, #"Renamed Columns", instead of&amp;nbsp;Source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2017 06:41:33 GMT</pubDate>
    <dc:creator>MarcelBeug</dc:creator>
    <dc:date>2017-09-19T06:41:33Z</dc:date>
    <item>
      <title>Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/250448#M111159</link>
      <description>&lt;P&gt;Hello Power BI Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question regarding DAX expression.&lt;/P&gt;&lt;P&gt;I have a dummy data below.&lt;/P&gt;&lt;P&gt;In the file, I have a data with names of products and weight out of each product in text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/x/s!AnI_BVwf2LNygQ20ygw2e9dConWc" target="_self"&gt;DummyData&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is to extract just the text on weights (i.e. 75GX4PX6)&lt;/P&gt;&lt;P&gt;Then I would like to calculate the weight of the total product. (i.e. 75*4*6= 1,800)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the weight in the text is not listed in a consistant format or&lt;/P&gt;&lt;P&gt;a length of characters is not always the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to extract just the weight text?&lt;/P&gt;&lt;P&gt;Or a direct way to calculate the total weight?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 02:43:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/250448#M111159</guid>
      <dc:creator>hidenseek9</dc:creator>
      <dc:date>2017-09-13T02:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/250541#M111206</link>
      <description>&lt;P&gt;Probably Power Query would be the better tool for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used only your one example in the code below, so you should adjust the source to yours if you want to use this solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically the solution first splits the text on any digits, then splits the original text again, using the result from the first split as new delimiters (resulting in the&amp;nbsp;digit ranges). These are converted to numbers and multiplied with each other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let
    Source =                #table(type table[Text on Weight = text],{{"75GX4PX6"}}),
    SplitTextOnDigits =     Table.AddColumn(Source, "Delimiters", each Text.SplitAny([Text on Weight],"0123456789")),
    RemoveBlanks1 =         Table.TransformColumns(SplitTextOnDigits,{{"Delimiters", each List.Select(_, each _ &amp;lt;&amp;gt; "")}}),
    SplitTextOnDelimiters = Table.AddColumn(RemoveBlanks1, "Weight", each Splitter.SplitTextByEachDelimiter([Delimiters])([Text on Weight])),
    RemoveBlanks2 =         Table.TransformColumns(SplitTextOnDelimiters,{{"Weight", each List.Select(_, each _ &amp;lt;&amp;gt; "")}}),
    NumberFrom =            Table.TransformColumns(RemoveBlanks2,{{"Weight", each List.Transform(_, Number.From)}}),
    Product =               Table.TransformColumns(NumberFrom,{{"Weight", List.Product}}),
    RemovedDelimiters =     Table.RemoveColumns(Product,{"Delimiters"})
in
    RemovedDelimiters&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Sep 2017 06:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/250541#M111206</guid>
      <dc:creator>MarcelBeug</dc:creator>
      <dc:date>2017-09-13T06:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251244#M111555</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17460" data-lia-user-login="MarcelBeug" class="lia-mention lia-mention-user"&gt;MarcelBeug&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I am new to Power Query, so I am having a difficult time understanding&lt;/P&gt;&lt;P&gt;the formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I simply copy and pasted the formula you provided to me to&lt;/P&gt;&lt;P&gt;already existing query, but it comes out as an error.&lt;/P&gt;&lt;P&gt;I understand that reference names are wrong, but not sure how to fix it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be able to help me with this one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 01:21:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251244#M111555</guid>
      <dc:creator>hidenseek9</dc:creator>
      <dc:date>2017-09-14T01:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251275#M111561</link>
      <description>&lt;P&gt;If you can share the specific erroe message I might be able to help you.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 02:06:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251275#M111561</guid>
      <dc:creator>GabrielSantos</dc:creator>
      <dc:date>2017-09-14T02:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251339#M111599</link>
      <description>&lt;P&gt;My column "Text on Weight" is your column "Data".&lt;/P&gt;&lt;P&gt;However, you forgot to change&amp;nbsp;"Text on Weight" in step SplitTextOnDelimiters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="28728" data-lia-user-login="GabrielSantos" class="lia-mention lia-mention-user"&gt;GabrielSantos&lt;/a&gt;&amp;nbsp;already mentioned, it would be better to share the error message and the step in which the error mesage first ooccurs.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 02:49:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251339#M111599</guid>
      <dc:creator>MarcelBeug</dc:creator>
      <dc:date>2017-09-14T02:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251480#M111693</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="26310" data-lia-user-login="hidenseek9" class="lia-mention lia-mention-user"&gt;hidenseek9&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try to use below formula to get the number list and calcualte the mutiple result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#"Added Custom" = Table.AddColumn(#"Previous Steps", "ColumnName", each List.Product(List.Transform(List.Select(Text.SplitAny([Data],Text.Combine({"A".."Z"," "})),each Number.Mod(try Number.From(_) otherwise null,1)=0), each Int32.From(_))))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Values", each List.Product(List.Transform(List.Select(Text.SplitAny([Data],Text.Combine({"A".."Z"," "})),each Number.Mod(try Number.From(_) otherwise null,1)=0), each Int32.From(_))))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Comment:&lt;/P&gt;
&lt;P&gt;Text.SplitAny([Data],Text.Combine({"A".."Z"," "})) //Use random alphabets as the separator to split original string to list.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;List.Select(list,each Number.Mod(try Number.From(_) otherwise null,1)=0) //select each number items.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;List.Transform(list, each Int32.From(_)) //transform text list to number list&lt;BR /&gt;List.Product(list) // get the product from a list of numbers.&lt;/P&gt;
&lt;DIV id="page"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Full query:&lt;/P&gt;
&lt;PRE&gt;let
    Source = Excel.Workbook(File.Contents("C:\Users\xxxx\Desktop\sample data.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Sheet1_Sheet,{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", Int64.Type}}),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "Data"}}),
    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Values", each List.Product(List.Transform(List.Select(Text.SplitAny([Data],Text.Combine({"A".."Z"," "})),each Number.Mod(try Number.From(_) otherwise null,1)=0), each Int32.From(_))))
in
    #"Added Custom"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 06:05:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/251480#M111693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-14T06:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254405#M113219</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17460" data-lia-user-login="MarcelBeug" class="lia-mention lia-mention-user"&gt;MarcelBeug&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="28728" data-lia-user-login="GabrielSantos" class="lia-mention lia-mention-user"&gt;GabrielSantos&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the input.&lt;/P&gt;&lt;P&gt;I applied the formula into Power BI and it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the formula I have under advanced editor query.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the data appears like this. At this stage, the data looks okay.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the next step, the data appears like below and this is not working.&lt;/P&gt;&lt;P&gt;I would like to have word extract of weight, (i.e. 75G4PX6)&lt;/P&gt;&lt;P&gt;but the data is completely restructured.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any way to keep the structure of the data the same,&lt;/P&gt;&lt;P&gt;and have word extract in a new column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 06:04:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254405#M113219</guid>
      <dc:creator>hidenseek9</dc:creator>
      <dc:date>2017-09-19T06:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254436#M113236</link>
      <description>&lt;P&gt;In step SplitTextOnDigits, you should use the name of the previous step, #"Renamed Columns", instead of&amp;nbsp;Source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 06:41:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254436#M113236</guid>
      <dc:creator>MarcelBeug</dc:creator>
      <dc:date>2017-09-19T06:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254462#M113250</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17460" data-lia-user-login="MarcelBeug" class="lia-mention lia-mention-user"&gt;MarcelBeug&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perfect! This works!&lt;/P&gt;&lt;P&gt;Thank you for the input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question, though.&lt;/P&gt;&lt;P&gt;The problem is that the data has two different varieties.&lt;/P&gt;&lt;P&gt;1) 75G4PX6 (Meaning that 1 Pack = 75G *4, 1 case = 6 packs)&lt;/P&gt;&lt;P&gt;2) 110G1P (Meaning that 1 pack = 110G*1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some text has weight by a case, and others are based on a pack.&lt;/P&gt;&lt;P&gt;What I would like now to do is to have a column that will have the weight per pack.&lt;/P&gt;&lt;P&gt;Then I will add a column with a number of packs per case,&lt;/P&gt;&lt;P&gt;and simply multiply two columns to get the total weight by case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I change the query editor, so that it will just calculate the weight per pack?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 06:58:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254462#M113250</guid>
      <dc:creator>hidenseek9</dc:creator>
      <dc:date>2017-09-19T06:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254506#M113270</link>
      <description>&lt;P&gt;It depends.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the pack size is always the third number, then you can adjust the "Product"&amp;nbsp;step to have only the first 2 values multiplied.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Product =               Table.TransformColumns(NumberFrom,{{"Weight", each List.Product(List.FirstN(_,2))}}),&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise I'm curious how you are going to create the column with the number of packs per case.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 07:29:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254506#M113270</guid>
      <dc:creator>MarcelBeug</dc:creator>
      <dc:date>2017-09-19T07:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to extract certain words out?</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254555#M113296</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17460" data-lia-user-login="MarcelBeug" class="lia-mention lia-mention-user"&gt;MarcelBeug&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perfect!&lt;/P&gt;&lt;P&gt;Thank you so much for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 08:05:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-extract-certain-words-out/m-p/254555#M113296</guid>
      <dc:creator>hidenseek9</dc:creator>
      <dc:date>2017-09-19T08:05:49Z</dc:date>
    </item>
  </channel>
</rss>

