<?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 Dynamic filtering the values on disconnected slicer with WHERE clause in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2566941#M73164</link>
    <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;The problem&lt;/SPAN&gt;:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Let the data structure be following for the simplicity: Query1 has columns 'Name' and 'Brand' with many-to-many relationship ( one Name contains several Brands but also one Brand can be found in several Names) . However I need to filter on Brand and be able to see all the Names where at least one of the Brands is equal to the selected one(s).&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have created a diconnected table for the Brand and need your help to write a proper measure with the following logic:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Selector =&lt;/P&gt;&lt;P class=""&gt;var &lt;SPAN class=""&gt;selector&lt;/SPAN&gt; = selectedvalue('disconnected table'[Brand])&lt;/P&gt;&lt;P class=""&gt;var &lt;SPAN class=""&gt;selected&lt;/SPAN&gt; =&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;EM&gt;return all values of Query1[Name] where Query1[Brand] contains selector&lt;/EM&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;return &lt;SPAN class=""&gt;selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I am quite new to DAX and tried to search but nothing I find is even close to my problem. I appreciate any help/link/hint.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Kind regards,&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Maria&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2022 14:56:20 GMT</pubDate>
    <dc:creator>ladybel</dc:creator>
    <dc:date>2022-06-08T14:56:20Z</dc:date>
    <item>
      <title>Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2566941#M73164</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;The problem&lt;/SPAN&gt;:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Let the data structure be following for the simplicity: Query1 has columns 'Name' and 'Brand' with many-to-many relationship ( one Name contains several Brands but also one Brand can be found in several Names) . However I need to filter on Brand and be able to see all the Names where at least one of the Brands is equal to the selected one(s).&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have created a diconnected table for the Brand and need your help to write a proper measure with the following logic:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Selector =&lt;/P&gt;&lt;P class=""&gt;var &lt;SPAN class=""&gt;selector&lt;/SPAN&gt; = selectedvalue('disconnected table'[Brand])&lt;/P&gt;&lt;P class=""&gt;var &lt;SPAN class=""&gt;selected&lt;/SPAN&gt; =&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;EM&gt;return all values of Query1[Name] where Query1[Brand] contains selector&lt;/EM&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;return &lt;SPAN class=""&gt;selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I am quite new to DAX and tried to search but nothing I find is even close to my problem. I appreciate any help/link/hint.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Kind regards,&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Maria&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 14:56:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2566941#M73164</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-08T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2574467#M73649</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="256838" data-lia-user-login="ladybel" class="lia-mention lia-mention-user"&gt;ladybel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Selector =
CALCULATETABLE (
    VALUES ( Query1[Name] ),
    FILTER ( Query1, Query1[Brand] IN VALUES ( 'disconnected table'[Brand] ) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;It will return a table contains the [Names].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 08:31:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2574467#M73649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-13T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577073#M73817</link>
      <description>&lt;P&gt;Hello Jay, thanks a lot for your reaction, but I guess there is an opposite logic&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need:&amp;nbsp; &lt;STRONG&gt;'disconnected table'[Brand] in values (Query1[Brand]),&lt;/STRONG&gt; but it gives an error, so how is it possible to write this correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 08:19:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577073#M73817</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-14T08:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577151#M73824</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="256838" data-lia-user-login="ladybel" class="lia-mention lia-mention-user"&gt;ladybel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Return the 'disconnected table'[Brand] if it is in 'Query1'[Brand].&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Selector =
CALCULATETABLE (
    VALUES ( 'disconnected table'[Brand] ),
    FILTER (
        'disconnected table',
        'disconnected table'[Brand] IN VALUES ( Query1[Brand] )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 08:43:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577151#M73824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-14T08:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577375#M73840</link>
      <description>&lt;P&gt;There is a problem, I need to return a Query1[Name], I use the disconnected table only as a tool for filtering for a brand. I don't filter on Query1[Brand]&amp;nbsp; because it will filter out all the other options, and that is what I try to avoid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a bit more complicated logic, hence this post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But thank you for trying to help me.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 10:20:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577375#M73840</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-14T10:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577382#M73844</link>
      <description>&lt;P&gt;if I could you the SQL syntaxis, I would write something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Selector =
CALCULATETABLE (
    VALUES ( Query1[Name] ),
    WHERE EXISTS
    Query1[Brand] = ( 'disconnected table'[Brand])  
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Jun 2022 10:23:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2577382#M73844</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-14T10:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2579858#M73992</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="256838" data-lia-user-login="ladybel" class="lia-mention lia-mention-user"&gt;ladybel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I understand, the returned result should be the [Name] column in Query1 with the condition Query1's [Brand] exists in 'disconnected table', am I right?&lt;/P&gt;
&lt;P&gt;It would be easier to understand if you could share some sample data and expected result.&lt;/P&gt;
&lt;P&gt;Query1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;'disconnected table':&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Expected result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 10:05:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2579858#M73992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T10:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2579885#M73995</link>
      <description>&lt;P&gt;Hello Jay,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;From what I understand, the returned result should be the [Name] column in Query1 with the condition Query1's [Brand] exists in 'disconnected table', am I right?'&lt;/EM&gt;&amp;nbsp; -actually the opposite &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the values of the&amp;nbsp;'disconnected table'[Brand] should exist in the values of&amp;nbsp;Query1's [Brand].&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lets say you have 3 tests with 4 products each. Each product can be be of brand&amp;nbsp; A , B, C and D. In each test you normally have products of different brands.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test1: Product1: brand A, Product2:Brand A, product3: brand A, Product 4:Brand B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test2:Product1: brand C, Product2:Brand B, product3: brand C, Product 4:Brand B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test3:Product1: brand D, Product2:Brand D, product3: brand A, Product 4:Brand C&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lets filter now in the 'disconnected table'[Brands], say I selected brand C&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The desired output shoud be: Test2, Test3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Selected brands A and D&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The desired output shoud be: Test1, Test3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kind regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Maria&lt;/STRONG&gt;&lt;/P&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&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 10:21:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2579885#M73995</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-15T10:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2579903#M73998</link>
      <description>&lt;P&gt;Actually I don't only need the test names, but also have to be able to visualize the tests.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if I selected &lt;STRONG&gt;brand C&lt;/STRONG&gt;,&amp;nbsp; I want to see the visualization of the Test2 and Test3 with the complete data, for &lt;EM&gt;&lt;STRONG&gt;all the 4 products in each !&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;And what PowerBI normally does, it filters also on brand and I get only the data of those two tests but also only for the brand C!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 10:26:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2579903#M73998</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-15T10:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2585317#M74333</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="256838" data-lia-user-login="ladybel" class="lia-mention lia-mention-user"&gt;ladybel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are test1, test2 and test3 splitted tables that contain columns [product] and [brand]?&lt;/P&gt;
&lt;P&gt;I might be able to create the DAX if you could share some sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 09:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2585317#M74333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-17T09:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering the values on disconnected slicer with WHERE clause</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2611546#M75765</link>
      <description>&lt;P&gt;Hello Jay, actually they are not splitted.. Will this help if I split them?&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you mean by sharing a sample data ? I am not quite sure how I can do this..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 08:55:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-filtering-the-values-on-disconnected-slicer-with-WHERE/m-p/2611546#M75765</guid>
      <dc:creator>ladybel</dc:creator>
      <dc:date>2022-06-30T08:55:24Z</dc:date>
    </item>
  </channel>
</rss>

