<?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: FILTER function query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/719234#M1314</link>
    <description>&lt;P&gt;I think it's best to show by example, take table like this:&lt;/P&gt;
&lt;TABLE style="height: 210px;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="width: 54px;"&gt;Color&lt;/TD&gt;
&lt;TD style="width: 53px;"&gt;Brand&lt;/TD&gt;
&lt;TD style="width: 40px;"&gt;Amount&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="width: 53px;"&gt;SQLBI&lt;/TD&gt;
&lt;TD style="width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;SQLBI&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;A&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;B&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Blue&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;SQLBI&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Blue&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;A&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Green&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;B&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;the measures return following results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;let's take the first row in incorrect - unmodified filter context is Color = Blue &amp;amp;&amp;amp; Brand = A&lt;BR /&gt;Which is effectively just 1 row table that looks like this:&lt;/P&gt;
&lt;P&gt;table like this:&lt;/P&gt;
&lt;TABLE style="height: 60px;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="width: 54px;"&gt;Color&lt;/TD&gt;
&lt;TD style="width: 53px;"&gt;Brand&lt;/TD&gt;
&lt;TD style="width: 69px;"&gt;Amount&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Blue&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;A&lt;/TD&gt;
&lt;TD style="height: 30px; width: 69px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;the numbers of rows that are Red or SQLBI in this table = 0, hence blank&lt;/P&gt;
&lt;P&gt;So ALL allows to get the value that's visible in the Total row, rather than one that is specific to partivular filter context&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope that helps&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jun 2019 16:13:25 GMT</pubDate>
    <dc:creator>Stachu</dc:creator>
    <dc:date>2019-06-19T16:13:25Z</dc:date>
    <item>
      <title>FILTER function query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/718917#M1298</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to find the value of SalesAmount for all products with "SQLBI" brand or color "Red" while not altering filters in other columns (It's a question on the sqlbi website).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this statment is correct:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Calculate (
    [SalesAmount],
    FILTER (
        ALL (
            Product[Color],
            Product[Brand]
        ),
        Product[Color] = "Red" || Product[Brand] = "SQLBI"
    )
)&lt;/PRE&gt;&lt;P&gt;But please can you tell me why the code below is wrong? I thought that the line &lt;STRONG&gt;Product[Color] = "Red" || Product[Brand] = "SQLBI"&lt;/STRONG&gt; would automatically override any filters for Product[Color] and Product[Brand]? So the two snippets of code would be equivalent?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CALCULATE (
    [SalesAmount],
    FILTER (
        Product,
        Product[Color] = "Red" || Product[Brand] = "SQLBI"
        )
    )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CM&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 11:06:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/718917#M1298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-19T11:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/719234#M1314</link>
      <description>&lt;P&gt;I think it's best to show by example, take table like this:&lt;/P&gt;
&lt;TABLE style="height: 210px;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="width: 54px;"&gt;Color&lt;/TD&gt;
&lt;TD style="width: 53px;"&gt;Brand&lt;/TD&gt;
&lt;TD style="width: 40px;"&gt;Amount&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="width: 53px;"&gt;SQLBI&lt;/TD&gt;
&lt;TD style="width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;SQLBI&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;A&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Red&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;B&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Blue&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;SQLBI&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Blue&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;A&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Green&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;B&lt;/TD&gt;
&lt;TD style="height: 30px; width: 40px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;the measures return following results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;let's take the first row in incorrect - unmodified filter context is Color = Blue &amp;amp;&amp;amp; Brand = A&lt;BR /&gt;Which is effectively just 1 row table that looks like this:&lt;/P&gt;
&lt;P&gt;table like this:&lt;/P&gt;
&lt;TABLE style="height: 60px;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="width: 54px;"&gt;Color&lt;/TD&gt;
&lt;TD style="width: 53px;"&gt;Brand&lt;/TD&gt;
&lt;TD style="width: 69px;"&gt;Amount&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 30px;"&gt;
&lt;TD style="height: 30px; width: 54px;"&gt;Blue&lt;/TD&gt;
&lt;TD style="height: 30px; width: 53px;"&gt;A&lt;/TD&gt;
&lt;TD style="height: 30px; width: 69px;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;the numbers of rows that are Red or SQLBI in this table = 0, hence blank&lt;/P&gt;
&lt;P&gt;So ALL allows to get the value that's visible in the Total row, rather than one that is specific to partivular filter context&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope that helps&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 16:13:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/719234#M1314</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-06-19T16:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/719924#M1360</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="10823" data-lia-user-login="Stachu" class="lia-mention lia-mention-user"&gt;Stachu&lt;/a&gt; , is it correct to say that an OR statement doesn't override the existing filter context, but normal statments like the two below (without the "OR" condition) do override the existing filter context?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Product[Color] = "Red",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Product[Brand] = "SQLBI"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 08:13:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/719924#M1360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-20T08:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/720068#M1366</link>
      <description>actually my explanation is not accurate, I got very confused because of the multiple columns
this article does a good job explaining what's happening in the back
&lt;A href="https://www.sqlbi.com/articles/filter-arguments-in-calculate/" target="_blank"&gt;https://www.sqlbi.com/articles/filter-arguments-in-calculate/&lt;/A&gt;</description>
      <pubDate>Thu, 20 Jun 2019 09:54:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/720068#M1366</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-06-20T09:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/720119#M1369</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="10823" data-lia-user-login="Stachu" class="lia-mention lia-mention-user"&gt;Stachu&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at the link I see the section "Table Filter" which says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT face="&amp;quot;Nunito&amp;quot;,sans-serif"&gt;&lt;FONT color="#001000"&gt;"&lt;SPAN&gt;Using a table filter, you inherit the filter argument existing for the Product table, so you will not include a product Red or of the Contoso brand if it was not present in the existing filter. What is more important, you will not override the existing filter on such a column. Thus, if you have a slicer filtering the brand Proseware, you will see the sales amount of only the products Red belonging to Proseware brand, ignoring any product of the Contoso brand.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I don't understand is the sentance "&lt;SPAN&gt;&lt;I&gt;&lt;FONT color="#001000" face="Arial"&gt;What is more important, you will not override the existing filter on such a column&lt;/FONT&gt;&lt;/I&gt;&lt;/SPAN&gt;" - I thought the FILTER function adopts all existing filters and overrides them where a filter is defined in the FILTER function? I don't understand why an OR filter within a FILTER function would not override the existing filter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CM&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 10:20:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/720119#M1369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-20T10:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/720196#M1373</link>
      <description>&lt;P&gt;FILTER does override for a single column, with multiple columns that seems to not be the case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try doing an analysis with ISFILTERED and ISCROSSFILTERED, it could be related to that, but I am not really sure why exactly it acts this way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the conclusions of the article they mention a book that's supposed to have more detailed analysis, maybe it's worth looking into&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 12:25:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-query/m-p/720196#M1373</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-06-20T12:25:15Z</dc:date>
    </item>
  </channel>
</rss>

