<?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: How to use or function with filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3708082#M144249</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="644992" data-lia-user-login="govindarajan_d" class="lia-mention lia-mention-user"&gt;govindarajan_d&lt;/a&gt;&amp;nbsp;you are right, I forgot about that limitation.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2024 13:11:31 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-02-19T13:11:31Z</dc:date>
    <item>
      <title>How to use or function with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3704852#M144114</link>
      <description>&lt;P&gt;I am getting ask to modify a report. I need to report revenue for a set of customers plus any customer that has aquired some specific products.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the below query but I am getting the error that filter is used in a True /False expession.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Channel Customer =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Finance fact_Revenue_Lines'&lt;/SPAN&gt;&lt;SPAN&gt;[Total_Amount]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Finance dim_GL_Item'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;CONTAINSSTRING&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Finance dim_GL_Item'&lt;/SPAN&gt;&lt;SPAN&gt;[Product_Level_2]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Product Name"&lt;/SPAN&gt;&lt;SPAN&gt;)), &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'All dim_Customer'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;CONTAINSSTRING&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'All dim_Customer'&lt;/SPAN&gt;&lt;SPAN&gt;[Customer_Number]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"4066-01"&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Feb 2024 23:08:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3704852#M144114</guid>
      <dc:creator>Petegdl23</dc:creator>
      <dc:date>2024-02-16T23:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use or function with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3704971#M144122</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608116" data-lia-user-login="Petegdl23" class="lia-mention lia-mention-user"&gt;Petegdl23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FILTER function returns a table and OR function is expecting a boolean result as the input. That's the reason you are getting an error that '&lt;EM&gt;filter is used in a True /False expession.&lt;/EM&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try this code and see if it works:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used RELATED function to get the corresponding value of the Customer_Number.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Channel Customer = CALCULATE (
    SUM ( 'Finance fact_Revenue_Lines'[Total_Amount] ),
    FILTER (
        'Finance dim_GL_Item',
        CONTAINSSTRING ( 'Finance dim_GL_Item'[Product_Level_2], "Product Name" )
            || CONTAINSSTRING ( RELATED ( 'All dim_Customer'[Customer_Number] ), "4066-01" )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Upvote and accept as a solution if it helps!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 03:32:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3704971#M144122</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-17T03:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use or function with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3706016#M144167</link>
      <description>&lt;P&gt;You don't really need an explicit FILTER for this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Channel Customer = CALCULATE (
    SUM ( 'Finance fact_Revenue_Lines'[Total_Amount] ),
    CONTAINSSTRING ( 'Finance dim_GL_Item'[Product_Level_2], "Product Name" )
    || CONTAINSSTRING ( 'All dim_Customer'[Customer_Number] , "4066-01" )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 14:58:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3706016#M144167</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-18T14:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use or function with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3706461#M144188</link>
      <description>&lt;P&gt;I don't think it will work:&lt;/P&gt;&lt;P&gt;1. Given that filter conditions that use two different columns cannot be written in this way&lt;/P&gt;&lt;P&gt;2. OP had not used ALL in his filter function. Implicit filters apply ALL on the table before filtering&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/specifying-multiple-filter-conditions-in-calculate/" target="_blank"&gt;https://www.sqlbi.com/articles/specifying-multiple-filter-conditions-in-calculate/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 00:56:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3706461#M144188</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-19T00:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use or function with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3708082#M144249</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="644992" data-lia-user-login="govindarajan_d" class="lia-mention lia-mention-user"&gt;govindarajan_d&lt;/a&gt;&amp;nbsp;you are right, I forgot about that limitation.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 13:11:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3708082#M144249</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-19T13:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use or function with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3717311#M144712</link>
      <description>&lt;P&gt;I was able to solve it like this. I created two separate measures, one with filters by customer numbers and another one with products filtered. Then I created a third measure that sum boths and that's it.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 14:17:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-or-function-with-filters/m-p/3717311#M144712</guid>
      <dc:creator>Petegdl23</dc:creator>
      <dc:date>2024-02-22T14:17:16Z</dc:date>
    </item>
  </channel>
</rss>

