<?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: Compare a function with a date. Help me please. (DAX) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978511#M11896</link>
    <description>&lt;P&gt;Greg, first of all thank you for your interest in helping, but it has nothing to do with space. "No syntax errors detected". The "x" of the question here is how to compare a column with dates to a function. In the example case I am trying to use the "Date.IsInCurrentDay" function.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 16:35:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-17T16:35:57Z</dc:date>
    <item>
      <title>Compare a function with a date. Help me please. (DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978290#M11887</link>
      <description>&lt;P&gt;Can someone help me? I inserted the following function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [Status] = "in progress" and [Actual End] = null and [Scheduled End]&amp;gt; = Date.IsInCurrentDay then "3" else&lt;BR /&gt;if [Real Start] = null and [Programmed End]&amp;gt; = Date.IsInCurrentDay then "1" else&lt;BR /&gt;if [Actual End] &amp;lt;= Date.IsInCurrentDay and [Actual End] &amp;lt;= [Scheduled End] and [Actual End] &amp;lt;&amp;gt; null then "1" else "2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following message: Expression.Error: We were unable to apply the &amp;lt;operator to the Function and Date types.&lt;BR /&gt;Details:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Operator = &amp;lt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left = [Function]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right = 08/29/2019&lt;/P&gt;&lt;P&gt;Can someone help me?&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:02:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978290#M11887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-17T15:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Compare a function with a date. Help me please. (DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978335#M11890</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Maybe it is just how you posted it bu there were spaces between some of the &amp;gt;= so I removed those below. Hard to test though.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if [Status] = "in progress" and [Actual End] = null and [Scheduled End] &amp;gt;= Date.IsInCurrentDay then "3" else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if [Real Start] = null and [Programmed End] &amp;gt;= Date.IsInCurrentDay then "1" else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if [Actual End] &amp;lt;= Date.IsInCurrentDay and [Actual End] &amp;lt;= [Scheduled End] and [Actual End] &amp;lt;&amp;gt; null then "1" else "2"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:16:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978335#M11890</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-17T15:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compare a function with a date. Help me please. (DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978511#M11896</link>
      <description>&lt;P&gt;Greg, first of all thank you for your interest in helping, but it has nothing to do with space. "No syntax errors detected". The "x" of the question here is how to compare a column with dates to a function. In the example case I am trying to use the "Date.IsInCurrentDay" function.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 16:35:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978511#M11896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-17T16:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Compare a function with a date. Help me please. (DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978527#M11898</link>
      <description>&lt;P&gt;To make it clearer, I want to compare a column with dates and a function with a current date to find out if this condition sets a status to "Expired", for example.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 16:40:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/978527#M11898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-17T16:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare a function with a date. Help me please. (DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/985693#M12134</link>
      <description>Well, the syntax for the function is:&lt;BR /&gt;&lt;BR /&gt;Date.IsInCurrentDay(dateTime as any) as nullable logical&lt;BR /&gt;&lt;BR /&gt;What you're trying to do is use the function without arguments, which is akin to referring to the function and not its results.&lt;BR /&gt;&lt;BR /&gt;What you probably need is a comparison with:&lt;BR /&gt;&lt;BR /&gt;DateTime.FixedLocalNow()&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Sun, 22 Mar 2020 13:48:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-a-function-with-a-date-Help-me-please-DAX/m-p/985693#M12134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-22T13:48:40Z</dc:date>
    </item>
  </channel>
</rss>

