<?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: We cannot apply operator - to types Function and Date in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026931#M59633</link>
    <description>&lt;P&gt;Great. Thank you! Looks like that converts the DateTime format to date at which point it can be compared to my Report Date column.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 21:30:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-19T21:30:18Z</dc:date>
    <item>
      <title>We cannot apply operator - to types Function and Date</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026813#M59629</link>
      <description>&lt;P&gt;Hi all...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find the difference, in days, from today's date and a Report date. If the difference is greater than or equal to 60 days, produce a 1, else a 0. I am receiving a "We cannot apply operator - to types Function and Date" error with the expression below. The data type for Report Date is date, and I'm thinking the error has something to do with trying to compare a date/time field with a date field.&lt;BR /&gt;&lt;BR /&gt;each if Duration.Days(DateTime.LocalNow - [Report Date]) &amp;gt;= 60 then 1 else 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kudos to anyone who can assist here.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 19:18:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026813#M59629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-19T19:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: We cannot apply operator - to types Function and Date</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026895#M59630</link>
      <description>&lt;P&gt;Please try this instead&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;each if Duration.TotalDays(Date.From(DateTime.LocalNow()) - [Date]) &amp;lt;=60 then 1 else 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 20:27:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026895#M59630</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2021-08-19T20:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: We cannot apply operator - to types Function and Date</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026931#M59633</link>
      <description>&lt;P&gt;Great. Thank you! Looks like that converts the DateTime format to date at which point it can be compared to my Report Date column.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 21:30:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/We-cannot-apply-operator-to-types-Function-and-Date/m-p/2026931#M59633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-19T21:30:18Z</dc:date>
    </item>
  </channel>
</rss>

