<?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: DAX: How use dates in an IF function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3520045#M135210</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="636377" data-lia-user-login="LABrowne" class="lia-mention lia-mention-user"&gt;LABrowne&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean by "&lt;STRONG&gt;DONT&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;consider orders within 3 months of it's expiry date&lt;/SPAN&gt;", or what should be return in this case?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2023 13:46:48 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-11-07T13:46:48Z</dc:date>
    <item>
      <title>DAX: How use dates in an IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3519848#M135199</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am currently working on an if function and have completed most of it, please see below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;= &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;[QualityCheck(%)]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;Order&lt;/SPAN&gt;&lt;SPAN&gt;[NumberProductsOrdered]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;, "Green"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Orders have an expiry date a year after delivery. I need another condition within the logical test bit which is that &lt;STRONG&gt;DONT&lt;/STRONG&gt; consider orders within 3 months of it's expiry date. Expiry date is it's own column.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help greatly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Luke&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Nov 2023 12:16:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3519848#M135199</guid>
      <dc:creator>LABrowne</dc:creator>
      <dc:date>2023-11-07T12:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: How use dates in an IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3520045#M135210</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="636377" data-lia-user-login="LABrowne" class="lia-mention lia-mention-user"&gt;LABrowne&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean by "&lt;STRONG&gt;DONT&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;consider orders within 3 months of it's expiry date&lt;/SPAN&gt;", or what should be return in this case?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 13:46:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3520045#M135210</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-07T13:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: How use dates in an IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3520063#M135211</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="636377" data-lia-user-login="LABrowne" class="lia-mention lia-mention-user"&gt;LABrowne&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try something like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;VAR =&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF(&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[QualityCheck(%)] &amp;gt; 1&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; Order[NumberProductsOrdered] &amp;gt;= 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;amp;&amp;amp; TODAY() &amp;lt; 'Table'[Expiry Date] - 90&lt;/STRONG&gt;, --TODAY IS BEFORE 90 DAYS LEADING UP TO THE EXPIRY DATE&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Green",&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BLANK()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NOTE: In this example, I used TODAY().&amp;nbsp; However, if you need to compare it to a different date (i.e. Order[Order Date]), then simply switch to the desired date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Nathan&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Nov 2023 13:57:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-use-dates-in-an-IF-function/m-p/3520063#M135211</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-11-07T13:57:44Z</dc:date>
    </item>
  </channel>
</rss>

