<?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 How to get a specific date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2489327#M68465</link>
    <description>&lt;P&gt;I have a column I need to filter. As of Now I have it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;BeforeToday_MI = IF(Query_Util[MoveInDate].[Date] &amp;lt; TODAY(), True, False)&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It returns True if MoveInDate column has dates prior to today. However, I want the function to return true if the date is before Today AND the day is not Saturday or Sunday; in other words, the date belong to a weekday and not a weekend.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I tried this but it's giving me error:&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;BeforeToday_MI = IF(Query_Util[MoveInDate].[Date] &amp;lt; TODAY() &amp;amp;&amp;amp; VALUE(Query_Util[MoveInDate].[Day]) &amp;lt;&amp;gt; "Saturday", True, False)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 02 May 2022 18:27:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-02T18:27:40Z</dc:date>
    <item>
      <title>How to get a specific date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2489327#M68465</link>
      <description>&lt;P&gt;I have a column I need to filter. As of Now I have it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;BeforeToday_MI = IF(Query_Util[MoveInDate].[Date] &amp;lt; TODAY(), True, False)&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It returns True if MoveInDate column has dates prior to today. However, I want the function to return true if the date is before Today AND the day is not Saturday or Sunday; in other words, the date belong to a weekday and not a weekend.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I tried this but it's giving me error:&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;BeforeToday_MI = IF(Query_Util[MoveInDate].[Date] &amp;lt; TODAY() &amp;amp;&amp;amp; VALUE(Query_Util[MoveInDate].[Day]) &amp;lt;&amp;gt; "Saturday", True, False)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 May 2022 18:27:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2489327#M68465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-02T18:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a specific date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2489735#M68512</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BeforeToday_MI = IF( datevalues(Query_Util[MoveInDate]) &amp;lt; TODAY() &amp;amp;&amp;amp; weekday(Query_Util[MoveInDate],2) &amp;lt;6 , True, False)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 01:27:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2489735#M68512</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-05-03T01:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a specific date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2493936#M68759</link>
      <description>&lt;P&gt;What if I want to get the days that are not Saturday or Sunday?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(My bad; I forgot to include that specification before. I need work days. Your code works perfectly; I just need to act the condition of filtering out Sunday as well.)&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 15:57:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2493936#M68759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-04T15:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a specific date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2495733#M68828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you get your problem solved? If it was solved, please mark it as a solution so that more people can find it. If not, refer to the following.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;weekday(Query_Util[MoveInDate],2) return result follow the following rule.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;week begins on Monday (1) and ends on Sunday (7).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you only want filter out&amp;nbsp; sunday, then&amp;nbsp;weekday(Query_Util[MoveInDate],2) &amp;lt;7. Or enter the day you want like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;weekday(Query_Util[MoveInDate],2) = 1 &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;weekday(Query_Util[MoveInDate],2) = 2 &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;weekday(Query_Util[MoveInDate],2) = 3 &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;weekday(Query_Util[MoveInDate],2) = 4&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;More detail you can refer this function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/weekday-function-dax" target="_blank"&gt;WEEKDAY function (DAX) - DAX | Microsoft Docs&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 10:09:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-a-specific-date/m-p/2495733#M68828</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-05-05T10:09:08Z</dc:date>
    </item>
  </channel>
</rss>

