<?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: DateDiff with Direct Query as Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1172115#M18099</link>
    <description>&lt;P&gt;I have exactly the same. DirectQuery + Oracle database. Any ideas?&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jun 2020 20:43:02 GMT</pubDate>
    <dc:creator>luke611</dc:creator>
    <dc:date>2020-06-20T20:43:02Z</dc:date>
    <item>
      <title>DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/731656#M1782</link>
      <description>&lt;P&gt;I need to have the Date Difference between two Date columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# of Minutes = Datediff(OP_ORDER_ITEM_ARCHIVE[PICKING_AT];OP_ORDER_ITEM_ARCHIVE[REFILLING_AT];MINUTE)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the DateDiff Function but it gives me the following error message:&lt;/P&gt;&lt;P&gt;Query(1,1) Function 'DATEDIFF' is not allowed as part of calculated column DAX expressions on Direct Query models&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can I use it as measure, I know i need to filter the Results somehow by row.&lt;/P&gt;&lt;P&gt;Any help is appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 08:34:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/731656#M1782</guid>
      <dc:creator>MarionKeller</dc:creator>
      <dc:date>2019-07-04T08:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1172115#M18099</link>
      <description>&lt;P&gt;I have exactly the same. DirectQuery + Oracle database. Any ideas?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 20:43:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1172115#M18099</guid>
      <dc:creator>luke611</dc:creator>
      <dc:date>2020-06-20T20:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1172146#M18101</link>
      <description>&lt;P&gt;DATEDIFF is overrated. Try just subtracting one date from the other. Internally dates are treated as numbers with the whole part representing the days and the fraction representing, well fractions of days. Say you want to know the difference between Date A and Date B in hours, you would write ([Date A]-[Date B])*24&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 21:40:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1172146#M18101</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-20T21:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1173206#M18168</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;many thanks for swift reply. Unfortunately there is another error raised when I change DATEDIFF into simple minus between two dates:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORA-00904: "t0"."DATE_COLUMN": &lt;SPAN&gt;invalid identifier&lt;/SPAN&gt;. The exception was raised by the IDbCommand interface.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 08:25:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1173206#M18168</guid>
      <dc:creator>luke611</dc:creator>
      <dc:date>2020-06-22T08:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1173286#M18173</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="150643" data-lia-user-login="MarionKeller" class="lia-mention lia-mention-user"&gt;MarionKeller&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can have a look at this blog&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/DATEDIFF-in-Direct-Query-Mode-32-bit/m-p/492878" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/DATEDIFF-in-Direct-Query-Mode-32-bit/m-p/492878&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 09:09:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1173286#M18173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-22T09:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1173652#M18202</link>
      <description>&lt;P&gt;As you can see this is an error on the Oracle side. Verify that you got the field name right.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 14:49:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1173652#M18202</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-22T14:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff with Direct Query as Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1185050#M18585</link>
      <description>&lt;P&gt;Thank you Guys for your help. It seems that there is an issue on PBI side when Oracle 11g is being used as a source. PBI has a problem in building proper SQL. I've found two kinds of workarrounds: swith to Import or use own query to get data. Unfortunately both bring a lot of limitation.&lt;/P&gt;&lt;P&gt;I also tried to create measures but actualy I don't know how to solve it using only the measures. I need to calculate avarage of date differences for all rows. So let's say that I have a table with payments, first I need to calculate payment lag and then aggregate lags as an avarage for some dimensions.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 12:10:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff-with-Direct-Query-as-Measure/m-p/1185050#M18585</guid>
      <dc:creator>luke611</dc:creator>
      <dc:date>2020-06-26T12:10:09Z</dc:date>
    </item>
  </channel>
</rss>

