<?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 Search and assemble cell values into new column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2799297#M88038</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help to search and cut out values from a cell and assemble them in a new row.&lt;/P&gt;&lt;P&gt;I have a semicolon as separator and I need always the first string until an slash (in case an semicolon exists then next needed value would be after the semicolon until the next slash).&lt;/P&gt;&lt;P&gt;In case the values (if there are multiple - separated by semicolon) are same, then write only once in the new column (2nd row in example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Visualized should it look like this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="arial black,avant garde"&gt;Is&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT face="arial black,avant garde"&gt;ToBe&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enterprise Support/ Information Management;Procurement &amp;amp; Logistics/ Supplier CM/ Supplier Identification; Production/ Maintanence&lt;/TD&gt;&lt;TD&gt;Enterprise Support,&amp;nbsp;Procurement &amp;amp; Logistics,&amp;nbsp;Production&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enterprise Support/ Information Management;Enterprise Support&lt;/TD&gt;&lt;TD&gt;Enterprise Support&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Finance &amp;amp; Controlling&lt;/TD&gt;&lt;TD&gt;Finance &amp;amp; Controlling&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 09:22:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-27T09:22:23Z</dc:date>
    <item>
      <title>Search and assemble cell values into new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2799297#M88038</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help to search and cut out values from a cell and assemble them in a new row.&lt;/P&gt;&lt;P&gt;I have a semicolon as separator and I need always the first string until an slash (in case an semicolon exists then next needed value would be after the semicolon until the next slash).&lt;/P&gt;&lt;P&gt;In case the values (if there are multiple - separated by semicolon) are same, then write only once in the new column (2nd row in example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Visualized should it look like this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="arial black,avant garde"&gt;Is&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT face="arial black,avant garde"&gt;ToBe&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enterprise Support/ Information Management;Procurement &amp;amp; Logistics/ Supplier CM/ Supplier Identification; Production/ Maintanence&lt;/TD&gt;&lt;TD&gt;Enterprise Support,&amp;nbsp;Procurement &amp;amp; Logistics,&amp;nbsp;Production&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enterprise Support/ Information Management;Enterprise Support&lt;/TD&gt;&lt;TD&gt;Enterprise Support&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Finance &amp;amp; Controlling&lt;/TD&gt;&lt;TD&gt;Finance &amp;amp; Controlling&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 09:22:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2799297#M88038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-27T09:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search and assemble cell values into new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2801482#M88164</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;You can add a custom column with a custom function to achieve your requirement:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    #"Added Custom" = Table.AddColumn(#"Changed Type", "ToBe", each 
            Function.Invoke((x as list)=&amp;gt; 
                let
                    Replaced= 
                        if List.Count(x) &amp;gt; 1 
                        then List.RemoveNulls(List.Transform(x, each 
                            if Text.Contains(_,"/") 
                            then Text.Start(_, Text.PositionOf(_,"/")) 
                            else null )) 
                        else x,
                    Result =Text.Combine(Replaced,",")
                in 
                    Result
            ,{List.Distinct(Text.Split([Is],";"))} ))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Result:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Full query:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("lc4xC4NADAXgvxJuLigdujhKC0KFgqO94TijBDSRmPv/vR4UCp26vcDLxxtHd2VD3ZUOhCHtu6hV0PEsugUjYegDhwU3ZGseKjFpyfBMdX2+wF0WOoziUZXvlVCh7b+ObsptmikWrYFsTCm+c5VpYguMHNH5019TfqtFuBGHrH3WtcKmsq7Ei/P+BQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Is = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Is", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "ToBe", each 
            Function.Invoke((x as list)=&amp;gt; 
                let
                    Replaced= 
                        if List.Count(x) &amp;gt; 1 
                        then List.RemoveNulls(List.Transform(x, each 
                            if Text.Contains(_,"/") 
                            then Text.Start(_, Text.PositionOf(_,"/")) 
                            else null )) 
                        else x,
                    Result =Text.Combine(Replaced,",")
                in 
                    Result
            ,{List.Distinct(Text.Split([Is],";"))} ))
in
    #"Added Custom"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 02:29:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2801482#M88164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-28T02:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search and assemble cell values into new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2802307#M88212</link>
      <description>&lt;P&gt;Thanks a lot for your investigation! But it does not work on my side...&lt;/P&gt;&lt;P&gt;1. The search for "/" seems not to work&lt;/P&gt;&lt;P&gt;2. The case without / is not handled.&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;Have you any Input for me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance, Marko&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 09:30:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Search-and-assemble-cell-values-into-new-column/m-p/2802307#M88212</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-28T09:30:57Z</dc:date>
    </item>
  </channel>
</rss>

