<?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: RemoveFilters not working as expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3699089#M143873</link>
    <description>&lt;P&gt;Sorry, I only work with sample data.&amp;nbsp; I hope someone else can help you further.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 15:03:01 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-02-14T15:03:01Z</dc:date>
    <item>
      <title>RemoveFilters not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3691079#M143425</link>
      <description>&lt;P&gt;I have a page level filter for DaysAgo&amp;gt;0. This allows my MTD LY /YTD LY time calculation filters to work as expected and not go through the full month of the previous year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now also trying to build a measure for the full previous month of the current year, but this filter prevents it from looking past the current day (for example, it's 2/9/24 and I want full month of January, but the DAysAgo filter only shows to 1/9/24).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does RemoveFilters not work on page level filter context? Is there another way to accomplish this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Net Sales PrevMonth = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;([Net Sales MTD],&lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt;('Calendar'[Date Value],-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,MONTH),&lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;('Calendar'[Days Ago]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Feb 2024 14:00:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3691079#M143425</guid>
      <dc:creator>astano05</dc:creator>
      <dc:date>2024-02-09T14:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveFilters not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3692024#M143489</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 01:27:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3692024#M143489</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-10T01:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveFilters not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3699022#M143871</link>
      <description>&lt;P&gt;I'm not able to provide data in that way due to company policy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any reason why removefilters would not work on a page-level filter?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 14:38:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3699022#M143871</guid>
      <dc:creator>astano05</dc:creator>
      <dc:date>2024-02-14T14:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveFilters not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3699089#M143873</link>
      <description>&lt;P&gt;Sorry, I only work with sample data.&amp;nbsp; I hope someone else can help you further.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3699089#M143873</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-14T15:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveFilters not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3719386#M144812</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240754" data-lia-user-login="astano05" class="lia-mention lia-mention-user"&gt;astano05&lt;/a&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;Given your scenario, where you have a page-level filter for “DaysAgo &amp;gt; 0” and you're attempting to calculate “Net Sales PrevMonth” for the full previous month, your approach seems logically sound.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;The issue might stem from how the filter context is passed down or from the specific interactions between your measures and the data model.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;SPAN&gt;You might try the following:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Verify relationships: Make sure the relationships between the Calendar table and other related tables in the data model are set up correctly. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;If "REMOVEFILTERS" does not provide the expected results, consider using an alternative to explicitly define the calculated date range. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;For example, you can use the combination of "FILTER" and "ALL" to redefine the context of a calculation:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;      Last month’s net sales =
      calculate(
          sum('yourTable'[Net Sales MTD]),
          filter(
              all('calendar'),
              'Calendar'[date value] &amp;gt; EOMONTH(TODAY(), -2)
              &amp;amp;&amp;amp; 'Calendar'[date value] &amp;lt;= EOMONTH(TODAY(), -1)
          )
      )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;This metric explicitly sets the date range to the entire month of the previous month, regardless of current day or any page-level filters.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;Regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;Nono Chen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;to help the other members find it more quickly.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 09:21:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3719386#M144812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-23T09:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveFilters not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3719953#M144839</link>
      <description>&lt;P&gt;I was actually able to get my measure working by using ParallelPeriod in place of DateAdd. The RemoveFilters context was no longer needed with that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:49:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RemoveFilters-not-working-as-expected/m-p/3719953#M144839</guid>
      <dc:creator>astano05</dc:creator>
      <dc:date>2024-02-23T13:49:22Z</dc:date>
    </item>
  </channel>
</rss>

