<?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: Use a list in another tables add column formula in Power Query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-list-in-another-tables-add-column-formula-in-Power-Query/m-p/4611254#M176508</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="369518" data-lia-user-login="TJHughes" class="lia-mention lia-mention-user"&gt;TJHughes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, you can replace the current list expression &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;{...}&lt;/STRONG&gt;&lt;/FONT&gt; with a reference to the dynamic list.&lt;/P&gt;
&lt;P&gt;For example, if the list is made up of the values in a column of a table, say &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Table[Column]&lt;/STRONG&gt;&lt;/FONT&gt;, you could write this (I slightly edited the code):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(
    #"Changed Type", 
    "Custom", 
    each 
      if List.AnyTrue(List.Transform(Table[Column], (sunstring) =&amp;gt; Text.Contains([postcode], sunstring))) then
        "Y"
      else
        "N"
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise change &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Table[Column]&lt;/STRONG&gt;&lt;/FONT&gt; to an appropriate reference to the dynamic list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
    <pubDate>Sat, 15 Mar 2025 08:57:23 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2025-03-15T08:57:23Z</dc:date>
    <item>
      <title>Use a list in another tables add column formula in Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-list-in-another-tables-add-column-formula-in-Power-Query/m-p/4611158#M176504</link>
      <description>&lt;P&gt;I have column I have added in Power Query which works as I need it to. It searches a list of post codes and checks if column in the table contains that post code and gives&amp;nbsp; Y/N answer. The issue is that the list is hardcoded and not dynamic. I do have another table in the report that does have the list which is dynamic but I dont know if I can change my current formula to use this list instead?&lt;/P&gt;&lt;P&gt;Here is current formula I am using:&lt;/P&gt;&lt;P&gt;= Table.AddColumn(#"Changed Type", "Custom", each if( List.AnyTrue( List.Transform( { "B1 1","B1 2","B1 3","B10 0","B10 9","B11 1","B11 2","B11 3","B11 4","B11 9","B12 0","B12 8","B12 9","B13 0","B13 3","B13 8","B13 9","B14 4","B14 5","B14 6","B14 7","B15 1","B15 2","B15 3","B16 0","B16 6","B16 8","B16 9","B17 0","B17 8","B17 9","B18 4","B18 5","B18 6","B18 7","B19 1","B19 2","B19 3" }, (sunstring) =&amp;gt; Text.Contains( [postcode], sunstring ) ) ) ) = true then "Y" else "N")&lt;/P&gt;</description>
      <pubDate>Sat, 15 Mar 2025 05:37:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-list-in-another-tables-add-column-formula-in-Power-Query/m-p/4611158#M176504</guid>
      <dc:creator>TJHughes</dc:creator>
      <dc:date>2025-03-15T05:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use a list in another tables add column formula in Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-list-in-another-tables-add-column-formula-in-Power-Query/m-p/4611254#M176508</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="369518" data-lia-user-login="TJHughes" class="lia-mention lia-mention-user"&gt;TJHughes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, you can replace the current list expression &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;{...}&lt;/STRONG&gt;&lt;/FONT&gt; with a reference to the dynamic list.&lt;/P&gt;
&lt;P&gt;For example, if the list is made up of the values in a column of a table, say &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Table[Column]&lt;/STRONG&gt;&lt;/FONT&gt;, you could write this (I slightly edited the code):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(
    #"Changed Type", 
    "Custom", 
    each 
      if List.AnyTrue(List.Transform(Table[Column], (sunstring) =&amp;gt; Text.Contains([postcode], sunstring))) then
        "Y"
      else
        "N"
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise change &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Table[Column]&lt;/STRONG&gt;&lt;/FONT&gt; to an appropriate reference to the dynamic list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Mar 2025 08:57:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-list-in-another-tables-add-column-formula-in-Power-Query/m-p/4611254#M176508</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-03-15T08:57:23Z</dc:date>
    </item>
  </channel>
</rss>

