<?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 Split column and Combine Columns in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Split-column-and-Combine-Columns/m-p/2443945#M834</link>
    <description>&lt;P&gt;How to perform a ‘split and merge’ on columns to change (a) into (b)?&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;Use this power Query Code&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("i45W8kvMTVUISszLVorViVZySi0uUTDUMdIxAXP9MpNTFUx0THXMwFz3/PwUoCxQLhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Name Rank", type text}}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type1", "Name Rank", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Name Rank.1", "Name Rank.2"}),
    #"Split Column by Delimiter1" = Table.ExpandListColumn(Table.TransformColumns(#"Split Column by Delimiter", {{"Name Rank.2", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Name Rank.2"),
    #"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"Name Rank.1", type text}, {"Name Rank.2", Int64.Type}}),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Changed Type2", {{"Name Rank.2", type text}}, "en-US"),{"Name Rank.1", "Name Rank.2"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Merged")
in
    #"Merged Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 16:14:37 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-04-07T16:14:37Z</dc:date>
    <item>
      <title>Split column and Combine Columns</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Split-column-and-Combine-Columns/m-p/2443945#M834</link>
      <description>&lt;P&gt;How to perform a ‘split and merge’ on columns to change (a) into (b)?&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;Use this power Query Code&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("i45W8kvMTVUISszLVorViVZySi0uUTDUMdIxAXP9MpNTFUx0THXMwFz3/PwUoCxQLhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Name Rank", type text}}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type1", "Name Rank", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Name Rank.1", "Name Rank.2"}),
    #"Split Column by Delimiter1" = Table.ExpandListColumn(Table.TransformColumns(#"Split Column by Delimiter", {{"Name Rank.2", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Name Rank.2"),
    #"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"Name Rank.1", type text}, {"Name Rank.2", Int64.Type}}),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Changed Type2", {{"Name Rank.2", type text}}, "en-US"),{"Name Rank.1", "Name Rank.2"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Merged")
in
    #"Merged Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 16:14:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Split-column-and-Combine-Columns/m-p/2443945#M834</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-04-07T16:14:37Z</dc:date>
    </item>
  </channel>
</rss>

