<?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 Filter rows if they contain at least one value from a text array in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3719979#M144841</link>
    <description>&lt;DIV class=""&gt;I'm trying to show total sales for a products, witch name string contains at least one of the keywords from a static table. Here is the formula for it:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Sales by Group, EUR =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp; &amp;nbsp;[Sales, EUR],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;FILTER (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 'Sales Product Lookup',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CONTAINSSTRING(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Sales Product Lookup'[Product Name],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MAX('Table Keywords'[Keyword])&lt;BR /&gt;)))&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;For now it's pretty useless and only works for visuals in the form of a table where one of the columns = Table Keywords'[Keyword].&lt;/DIV&gt;&lt;DIV class=""&gt;How can I force the CONTAINSSTRING function to accept array/column instead of single value?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Will be realy appreciate for the help!&lt;/DIV&gt;</description>
    <pubDate>Fri, 23 Feb 2024 13:58:04 GMT</pubDate>
    <dc:creator>Moskalyk_Dmytro</dc:creator>
    <dc:date>2024-02-23T13:58:04Z</dc:date>
    <item>
      <title>Filter rows if they contain at least one value from a text array</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3719979#M144841</link>
      <description>&lt;DIV class=""&gt;I'm trying to show total sales for a products, witch name string contains at least one of the keywords from a static table. Here is the formula for it:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Sales by Group, EUR =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp; &amp;nbsp;[Sales, EUR],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;FILTER (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 'Sales Product Lookup',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CONTAINSSTRING(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Sales Product Lookup'[Product Name],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MAX('Table Keywords'[Keyword])&lt;BR /&gt;)))&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;For now it's pretty useless and only works for visuals in the form of a table where one of the columns = Table Keywords'[Keyword].&lt;/DIV&gt;&lt;DIV class=""&gt;How can I force the CONTAINSSTRING function to accept array/column instead of single value?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Will be realy appreciate for the help!&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:58:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3719979#M144841</guid>
      <dc:creator>Moskalyk_Dmytro</dc:creator>
      <dc:date>2024-02-23T13:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filter rows if they contain at least one value from a text array</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3720656#M144870</link>
      <description>&lt;P&gt;Not possible.&amp;nbsp; You could frankenstein it by running the CONTAINSSTRING against a composite key (a concatenation of all text columns) but that would be static-y too as you'd have to know the column list in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 20:35:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3720656#M144870</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-23T20:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filter rows if they contain at least one value from a text array</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3723230#M144990</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="695377" data-lia-user-login="Moskalyk_Dmytro" class="lia-mention lia-mention-user"&gt;Moskalyk_Dmytro&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It seems you are trying to create a calculated column that filters sales data based on keywords from a static table. I think you can make some changes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;First, create a new calculated column.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Keyword Match = 
VAR ProductName = 'Sales Product Lookup'[Product Name]
VAR Keywords = 'Table Keywords'[Keyword]
RETURN
CONTAINSSTRING(ProductName, Keywords)
&lt;/LI-CODE&gt;
&lt;P&gt;Now that you have the “Keyword Match” column, you can use it in your visualizations or calculations. For example, if you want to show total sales for products containing any of the keywords, create a measure like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales by Group, EUR = 
CALCULATE (
   [Sales, EUR],
   'Sales Product Lookup'[Keyword Match] = TRUE()
)
&lt;/LI-CODE&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;
&lt;P style="margin: 6.0pt 0in 0in 0in;"&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to Get Your Question Answered Quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 08:12:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-rows-if-they-contain-at-least-one-value-from-a-text-array/m-p/3723230#M144990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-26T08:12:17Z</dc:date>
    </item>
  </channel>
</rss>

