<?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 partial string filter based multiple selectedvalues in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1523956#M29784</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been looking all over the web to achieve something (that might not even work in PowerBI).&lt;BR /&gt;Anyhow, hopefully one of you is able to help me out here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;This is my problem;&lt;BR /&gt;&lt;BR /&gt;I have a fact table with a Group-Name column, that sometimes contain multiple Group-names.&lt;BR /&gt;&lt;BR /&gt;In order to filter this table i have created an unrelated filter table with all the relevant group names; (which is used as a slicer-list visual).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_Type_Filter = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATATABLE (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Subgroup", STRING,{{"Group01", etc}})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the basis of de slicer-selection the table is filtered if the value of underlying formula is unequal to 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FilterText = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR searchvalue =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SEARCH (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE( _Typen_Filter[Subgroup] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE(Facttable[GroupColomn]),,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BLANK())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF(searchvalue&amp;gt;0,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works as long as there is only 1 selectedvalue in de subgroup filter selection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just cant seem to get 2 or more values working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tried to change it to allselected, but this doesnt seem to do the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong, and is it even possible in PowerBI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2020 10:49:48 GMT</pubDate>
    <dc:creator>DokterT</dc:creator>
    <dc:date>2020-11-30T10:49:48Z</dc:date>
    <item>
      <title>partial string filter based multiple selectedvalues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1523956#M29784</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been looking all over the web to achieve something (that might not even work in PowerBI).&lt;BR /&gt;Anyhow, hopefully one of you is able to help me out here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;This is my problem;&lt;BR /&gt;&lt;BR /&gt;I have a fact table with a Group-Name column, that sometimes contain multiple Group-names.&lt;BR /&gt;&lt;BR /&gt;In order to filter this table i have created an unrelated filter table with all the relevant group names; (which is used as a slicer-list visual).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_Type_Filter = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATATABLE (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Subgroup", STRING,{{"Group01", etc}})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the basis of de slicer-selection the table is filtered if the value of underlying formula is unequal to 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FilterText = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR searchvalue =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SEARCH (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE( _Typen_Filter[Subgroup] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTEDVALUE(Facttable[GroupColomn]),,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BLANK())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF(searchvalue&amp;gt;0,1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works as long as there is only 1 selectedvalue in de subgroup filter selection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just cant seem to get 2 or more values working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tried to change it to allselected, but this doesnt seem to do the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong, and is it even possible in PowerBI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 10:49:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1523956#M29784</guid>
      <dc:creator>DokterT</dc:creator>
      <dc:date>2020-11-30T10:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: partial string filter based multiple selectedvalues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1524264#M29792</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273329" data-lia-user-login="DokterT" class="lia-mention lia-mention-user"&gt;DokterT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can probably use CONCATENATEX( ) to get all the entries from the slicer in one string.&amp;nbsp; For a more accurate answer I would need you to provide an example based on sample data of how things would work. I get the broad idea but need more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 13:07:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1524264#M29792</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-11-30T13:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: partial string filter based multiple selectedvalues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1525758#M29861</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;Thanks for the advice, will try and get that to work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As for a sample with fictional names (fruits/veggies might not be the best reallife example but you get the point hopefully);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The unrelated filter table contains one column with the follwing groups;&lt;/P&gt;&lt;P&gt;- "Apples"&lt;BR /&gt;- "Bananas"&lt;/P&gt;&lt;P&gt;- "Melons"&lt;/P&gt;&lt;P&gt;- "Onions"&lt;/P&gt;&lt;P&gt;- "Potatoes"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of facts table;&lt;/P&gt;&lt;P&gt;ActivityID | Group &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; | Details&amp;nbsp;&lt;/P&gt;&lt;P&gt;123212 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Potatoes // Onions&amp;nbsp; | jalfjklajf&lt;BR /&gt;142232 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Potatoes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; | kjfkljakdfa&lt;BR /&gt;154767 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Melons &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; | jkdhflahfhajkf&lt;BR /&gt;234234 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Bananas // Melons&amp;nbsp; | dadfjhejks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So what I basically want to achieve is to filter the fact table based on the selection in the unrelated filter table.&lt;/P&gt;&lt;P&gt;Hence, selecting potatoes will give me;&lt;/P&gt;&lt;P&gt;ActivityID | Group &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; | Details&amp;nbsp;&lt;/P&gt;&lt;P&gt;123212 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Potatoes // Onions&amp;nbsp; | jalfjklajf&lt;BR /&gt;142232 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Potatoes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; | kjfkljakdfa&lt;BR /&gt;&lt;BR /&gt;Selecting Melons AND Onions should give me;&lt;/P&gt;&lt;P&gt;ActivityID | Group &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Details&amp;nbsp;&lt;/P&gt;&lt;P&gt;123212 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Potatoes // Onions&amp;nbsp; | jalfjklajf&lt;BR /&gt;&lt;SPAN&gt;154767 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Melons &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; | jkdhflahfhajkf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;234234 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Bananas // Melons&amp;nbsp; | dadfjhejks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And all other variations based on multiple selections.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 08:02:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1525758#M29861</guid>
      <dc:creator>DokterT</dc:creator>
      <dc:date>2020-12-01T08:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: partial string filter based multiple selectedvalues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1526050#M29864</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273329" data-lia-user-login="DokterT" class="lia-mention lia-mention-user"&gt;DokterT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure exactly how you want to use this so I've created one of the alternatives. With it you can see the code pattern and adapt it as necessary.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Place FactT[Group] in a table visual&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;Place SlicerT[Group] on a slicer&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. &lt;/STRONG&gt;Create this measure. :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Show measure =
COUNTROWS (
    FILTER (
        DISTINCT ( SlicerT[Group] ),
        SEARCH ( SlicerT[Group], SELECTEDVALUE ( FactT[Group] ), 1, 0 ) &amp;gt; 0
    )
) + 0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; Set the measure above as a filter for the table visual. Choose Show then value is greater than 0. This will filter out the unwanted rows in tehe visual.&lt;/P&gt;
&lt;P&gt;See it all at work in the attached file with some simplified tables&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlB_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 09:49:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1526050#M29864</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-12-01T09:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: partial string filter based multiple selectedvalues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1526096#M29868</link>
      <description>&lt;P&gt;Thank a lot &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt; !! This did the trick &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 10:05:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/partial-string-filter-based-multiple-selectedvalues/m-p/1526096#M29868</guid>
      <dc:creator>DokterT</dc:creator>
      <dc:date>2020-12-01T10:05:17Z</dc:date>
    </item>
  </channel>
</rss>

