<?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 Date filter not ignored despite ALL and REMOVEFILTERS in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-filter-not-ignored-despite-ALL-and-REMOVEFILTERS/m-p/3674894#M142632</link>
    <description>&lt;P&gt;Hello, with my first question here I had bitten of a lot more that I could chew, so today I am asking about a smaller step in my DAX learning process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to calculate a First Order Date from an Invoices table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my calendar DAX:&lt;/P&gt;&lt;PRE&gt;DateTable = ADDCOLUMNS(CALENDARAUTO(),
"MonthNo", MONTH([Date]),
"MonthName", FORMAT([Date],"MMMM"),
"Quarter", QUARTER([Date]),&lt;BR /&gt;
"Year", YEAR([Date]),
"Day", DAY([Date]),
"WeekdayNum", WEEKDAY([Date]),
"WeekdayName",FORMAT([Date],"DDDD"),
"YearMonth", FORMAT([Date], "YYYY-MM"),
"YearQuarter", FORMAT([Date], "YYYY-Q"))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I have tried a few variations. At the moment, I have tried this code:&lt;/P&gt;&lt;PRE&gt;FirstOrderDate = CALCULATE(MIN('invoices_2019-2022'[Date Initiated]), 
ALL(DateTable[Date]))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That works fine as long as I have not selected any quarter in the slicer.&lt;/SPAN&gt;&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;Yet, as soon as I select a YearQuarter, the results change, and I get the First Order Date in the context of the slicer, despite the ALL function.&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;Before, I had tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;FirstOrderDate = CALCULATE(MIN('invoices_2019-2022'[Date Initiated]), 
REMOVEFILTERS(DateTable[Date]))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can probably tell, I have about a 5-year-old's underdstanding of DAX, so please explain in a simple way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 07:31:23 GMT</pubDate>
    <dc:creator>AlexanderMeneik</dc:creator>
    <dc:date>2024-02-02T07:31:23Z</dc:date>
    <item>
      <title>Date filter not ignored despite ALL and REMOVEFILTERS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-filter-not-ignored-despite-ALL-and-REMOVEFILTERS/m-p/3674894#M142632</link>
      <description>&lt;P&gt;Hello, with my first question here I had bitten of a lot more that I could chew, so today I am asking about a smaller step in my DAX learning process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to calculate a First Order Date from an Invoices table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my calendar DAX:&lt;/P&gt;&lt;PRE&gt;DateTable = ADDCOLUMNS(CALENDARAUTO(),
"MonthNo", MONTH([Date]),
"MonthName", FORMAT([Date],"MMMM"),
"Quarter", QUARTER([Date]),&lt;BR /&gt;
"Year", YEAR([Date]),
"Day", DAY([Date]),
"WeekdayNum", WEEKDAY([Date]),
"WeekdayName",FORMAT([Date],"DDDD"),
"YearMonth", FORMAT([Date], "YYYY-MM"),
"YearQuarter", FORMAT([Date], "YYYY-Q"))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I have tried a few variations. At the moment, I have tried this code:&lt;/P&gt;&lt;PRE&gt;FirstOrderDate = CALCULATE(MIN('invoices_2019-2022'[Date Initiated]), 
ALL(DateTable[Date]))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That works fine as long as I have not selected any quarter in the slicer.&lt;/SPAN&gt;&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;Yet, as soon as I select a YearQuarter, the results change, and I get the First Order Date in the context of the slicer, despite the ALL function.&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;Before, I had tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;FirstOrderDate = CALCULATE(MIN('invoices_2019-2022'[Date Initiated]), 
REMOVEFILTERS(DateTable[Date]))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can probably tell, I have about a 5-year-old's underdstanding of DAX, so please explain in a simple way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 07:31:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-filter-not-ignored-despite-ALL-and-REMOVEFILTERS/m-p/3674894#M142632</guid>
      <dc:creator>AlexanderMeneik</dc:creator>
      <dc:date>2024-02-02T07:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date filter not ignored despite ALL and REMOVEFILTERS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-filter-not-ignored-despite-ALL-and-REMOVEFILTERS/m-p/3674975#M142639</link>
      <description>&lt;P&gt;Looks like the solution was pretty simple - I need to use REMOVEFILTERS on the whole table, not just the [Date] column:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FirstOrderDate =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'invoices_2019-2022'&lt;/SPAN&gt;&lt;SPAN&gt;[Date Initiated]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DateTable&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That did the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 08:03:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-filter-not-ignored-despite-ALL-and-REMOVEFILTERS/m-p/3674975#M142639</guid>
      <dc:creator>AlexanderMeneik</dc:creator>
      <dc:date>2024-02-02T08:03:39Z</dc:date>
    </item>
  </channel>
</rss>

