<?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: Help needed with filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585426#M74338</link>
    <description>&lt;P&gt;Try changing the REMOVEFILTERS('Date'[Date]) to REMOVEFILTERS('Date'), so that filters on any column in the date table are removed. Its common with date tables for other filter columns to be added behind the scenes, e.g. a month sort order column.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 10:46:30 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-06-17T10:46:30Z</dc:date>
    <item>
      <title>Help needed with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2583435#M74210</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For background - the hire date field has no relationship with the date table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to count employees that were hired in the past year based on the date selected - but I need to remove the filter from the table so I can get all the employees.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I am trying - but the filter is still in place&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TTM Hires = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var&lt;/SPAN&gt; &lt;SPAN&gt;selecteddate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&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DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Monthly Workforce'[Hire Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;selecteddate&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Monthly Workforce'[Hire Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;enddate&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:35:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2583435#M74210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T14:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585426#M74338</link>
      <description>&lt;P&gt;Try changing the REMOVEFILTERS('Date'[Date]) to REMOVEFILTERS('Date'), so that filters on any column in the date table are removed. Its common with date tables for other filter columns to be added behind the scenes, e.g. a month sort order column.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 10:46:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585426#M74338</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-06-17T10:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585667#M74351</link>
      <description>&lt;P&gt;This really has me puzzled.&amp;nbsp; I am quite the beginner when it comes to DAX - but I thought what I was doing might work&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you - but the change did not work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get the correct answer by creating a calculated table that summarizes the Workforce table by month and then filtering for the needed timeframe.&amp;nbsp; But I am really curious as to why I can't get the other formula to work.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 12:55:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585667#M74351</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-17T12:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585682#M74353</link>
      <description>&lt;P&gt;Perhaps the FILTER is being called before the REMOVEFILTERS is applied. Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TTM Hires =
VAR selecteddate =
    MAX ( 'Date'[Date] )
VAR enddate =
    DATEADD ( LASTDATE ( 'Date'[Date] ), -1, YEAR )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Monthly Workforce'[FDS ID] ),
        REMOVEFILTERS ( 'Date' ),
        'Monthly Workforce'[Hire Date] &amp;lt;= selecteddate
            &amp;amp;&amp;amp; 'Monthly Workforce'[Hire Date] &amp;gt; enddate
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:04:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585682#M74353</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-06-17T13:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585691#M74354</link>
      <description>&lt;P&gt;Thank you so much.&amp;nbsp; This is such a long journey.&amp;nbsp; (Learning DAX)&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:09:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585691#M74354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-17T13:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585711#M74357</link>
      <description>&lt;P&gt;If you can, take the SQL BI guys &lt;A href="https://www.sqlbi.com/p/mastering-dax-video-course/" target="_self"&gt;course on DAX&lt;/A&gt;, and definitely check them out on &lt;A href="https://www.youtube.com/c/SQLBI/videos" target="_self"&gt;YouTube&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Enjoy DAX!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:16:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-needed-with-filters/m-p/2585711#M74357</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-06-17T13:16:25Z</dc:date>
    </item>
  </channel>
</rss>

