<?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: ALL() or REMOVEFILTERS() not working as expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-or-REMOVEFILTERS-not-working-as-expected/m-p/3914660#M152403</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="#community--1-" target="_blank" rel="noopener"&gt;@afaro&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since both categories and products come from the same table, the Auo-Exist mechanism is triggered so that invalid filter combinations are removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, with C1 and C2 selected for categories and P1 selected for products, the following combinations would normally result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Category=C1 &amp;amp;&amp;amp; Product=P1 ||&lt;/P&gt;&lt;P&gt;Category=C2 &amp;amp;&amp;amp; Product=P1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, due to the Auto-Exist mechanism, the combination category=C2 &amp;amp;&amp;amp; product=P1 is removed because product P1 does not belong to category C2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, it is required that the fields of both slicers cannot come from the same table, and a dimension table needs to be extracted to be used as the slicer's fields, e.g. you can extract category as the dimension table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the measure expressions and results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!Avkq2QNvDlkrwTCMbumXmK7fBkZx?e=26r8os" target="_blank" rel="noopener"&gt;Demo - ALL or REMOVEFILTERS not working as expected.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 17:02:35 GMT</pubDate>
    <dc:creator>xifeng_L</dc:creator>
    <dc:date>2024-05-13T17:02:35Z</dc:date>
    <item>
      <title>ALL() or REMOVEFILTERS() not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-or-REMOVEFILTERS-not-working-as-expected/m-p/3914517#M152398</link>
      <description>&lt;P&gt;I have two slicers category &amp;amp; product.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say the table looks something like this:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Revenue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;P1&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;P2&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;C2&lt;/TD&gt;&lt;TD&gt;P3&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate calculate the remaining revenue based on slicer selection product.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for example,for customer X,&amp;nbsp; if I choose category as C1 and C2 in category slicer and I choose Product as P1 in product slicer then I should get something like this:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Total Revenue&lt;/TD&gt;&lt;TD&gt;Remaining Revenue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;But I get something like this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Total Revenue&lt;/TD&gt;&lt;TD&gt;Remaining Revenue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;However, if I choose one product each from both categories, then the results are correct, so let's say I choose P1 and P3 in the product slicer, I get this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Total Revenue&lt;/TD&gt;&lt;TD&gt;Remaining Revenue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if one product for both categories isn't included then the remaining doesn't work write.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measures that I have written so far are which aren't giving me what I want are:&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;Total Revenue = CALCULATE(SUM(Table[Revenue]))

Remaining Revenue = CALCULATE([Total Revenue], ALL(Table[Product])) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:55:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-or-REMOVEFILTERS-not-working-as-expected/m-p/3914517#M152398</guid>
      <dc:creator>afaro</dc:creator>
      <dc:date>2024-05-13T15:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: ALL() or REMOVEFILTERS() not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-or-REMOVEFILTERS-not-working-as-expected/m-p/3914660#M152403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="#community--1-" target="_blank" rel="noopener"&gt;@afaro&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since both categories and products come from the same table, the Auo-Exist mechanism is triggered so that invalid filter combinations are removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, with C1 and C2 selected for categories and P1 selected for products, the following combinations would normally result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Category=C1 &amp;amp;&amp;amp; Product=P1 ||&lt;/P&gt;&lt;P&gt;Category=C2 &amp;amp;&amp;amp; Product=P1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, due to the Auto-Exist mechanism, the combination category=C2 &amp;amp;&amp;amp; product=P1 is removed because product P1 does not belong to category C2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, it is required that the fields of both slicers cannot come from the same table, and a dimension table needs to be extracted to be used as the slicer's fields, e.g. you can extract category as the dimension table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the measure expressions and results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!Avkq2QNvDlkrwTCMbumXmK7fBkZx?e=26r8os" target="_blank" rel="noopener"&gt;Demo - ALL or REMOVEFILTERS not working as expected.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 17:02:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-or-REMOVEFILTERS-not-working-as-expected/m-p/3914660#M152403</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-13T17:02:35Z</dc:date>
    </item>
  </channel>
</rss>

