<?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: Matching and filtering in Power Query (cyclic reference error) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matching-and-filtering-in-Power-Query-cyclic-reference-error/m-p/3239023#M119124</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 1:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PUxJCoAwDPxKyVH6o9JDuihFtJJOEX9vctDL7EwIlNvGUoE6vFOtmCagtC5myhR5KPpAEM77mA0udaAfWv6R6nFXxsUnvrzZY7EBxfgC", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1.words = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Column2.matched", (k)=&amp;gt; try Table.SelectRows(#"Table 2", each List.Contains(Text.Split(k[Column1.words],", "),[US_english]))[US_english]{0} otherwise "no match")
in
    #"Added Custom"&lt;/LI-CODE&gt;
&lt;P&gt;Table 2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSs5ML1bSUUrTAlMppUVFlUqxOkDxxLyUSqBIcXlqaglIKic/JycztRgsCRRMLClIzANLlBQlJmeDZJCYsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [US_english = _t, UK_english = _t, AU_english = _t])
in
    Source&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; You had trailing spaces at the end of sweatpants in your sample data.&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 00:04:15 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-05-17T00:04:15Z</dc:date>
    <item>
      <title>Matching and filtering in Power Query (cyclic reference error)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matching-and-filtering-in-Power-Query-cyclic-reference-error/m-p/3235579#M118917</link>
      <description>&lt;P&gt;I would like to do the equivalent of the below calculated column in Power BI as a Power Query expression.&amp;nbsp;This is a follow-up to &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Mapping-columns-from-different-tables-where-one-has-multiple/td-p/3207436#M116854" target="_self"&gt;my previous question&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Matched =
MAXX (
    FILTER (
        VALUES ( Table2[US_english] ),
        CONTAINSSTRING ( Table1[Word], Table2[US_english] )
    ),
    Table2[US_english]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following:&lt;/P&gt;&lt;PRE&gt;let x= Table.AddColumn(Table1, "Column2.matched", each Text.Combine(List.Select(Table2[US_english], (x) =&amp;gt; Text.Contains([Column1.words], x)),",")) in x&lt;/PRE&gt;&lt;P&gt;But it gives me a Expression.Error: A cyclic reference was encountered during evaluation.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 11:55:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matching-and-filtering-in-Power-Query-cyclic-reference-error/m-p/3235579#M118917</guid>
      <dc:creator>user180618</dc:creator>
      <dc:date>2023-05-15T11:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Matching and filtering in Power Query (cyclic reference error)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matching-and-filtering-in-Power-Query-cyclic-reference-error/m-p/3239023#M119124</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 1:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PUxJCoAwDPxKyVH6o9JDuihFtJJOEX9vctDL7EwIlNvGUoE6vFOtmCagtC5myhR5KPpAEM77mA0udaAfWv6R6nFXxsUnvrzZY7EBxfgC", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1.words = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Column2.matched", (k)=&amp;gt; try Table.SelectRows(#"Table 2", each List.Contains(Text.Split(k[Column1.words],", "),[US_english]))[US_english]{0} otherwise "no match")
in
    #"Added Custom"&lt;/LI-CODE&gt;
&lt;P&gt;Table 2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSs5ML1bSUUrTAlMppUVFlUqxOkDxxLyUSqBIcXlqaglIKic/JycztRgsCRRMLClIzANLlBQlJmeDZJCYsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [US_english = _t, UK_english = _t, AU_english = _t])
in
    Source&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; You had trailing spaces at the end of sweatpants in your sample data.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 00:04:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matching-and-filtering-in-Power-Query-cyclic-reference-error/m-p/3239023#M119124</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-05-17T00:04:15Z</dc:date>
    </item>
  </channel>
</rss>

