<?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: How to calculate number of days between two date fields in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216522#M52485</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235717" data-lia-user-login="g_hill" class="lia-mention lia-mention-user"&gt;g_hill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try below code:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Days to Let = DATEDIFF(Close Date,Let Date,day)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samarth&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 16:55:26 GMT</pubDate>
    <dc:creator>Samarth_18</dc:creator>
    <dc:date>2021-12-01T16:55:26Z</dc:date>
    <item>
      <title>How to calculate number of days between two date fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216515#M52484</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to set up a new measure to calculate number of days between two date fields in the same table. I've tried using the DATESBETWEEN DAX function but it doesn't work for me.&lt;BR /&gt;&lt;BR /&gt;The start date field is called &lt;EM&gt;Close Date&lt;/EM&gt; and the end date is called &lt;EM&gt;Let Date.&amp;nbsp;&lt;/EM&gt;They're both in a table called&amp;nbsp;&lt;EM&gt;CBLShortlists. &lt;/EM&gt;I've tried the following but it doesn't recognise the field names:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Days to Let = &lt;/SPAN&gt;&lt;SPAN&gt;DATESBETWEEN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CBLShortlists&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Close&lt;/SPAN&gt; &lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Let&lt;/SPAN&gt; &lt;SPAN&gt;Date&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;Can anyone suggest a way to work this out?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 16:50:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216515#M52484</guid>
      <dc:creator>g_hill</dc:creator>
      <dc:date>2021-12-01T16:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate number of days between two date fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216522#M52485</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235717" data-lia-user-login="g_hill" class="lia-mention lia-mention-user"&gt;g_hill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try below code:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Days to Let = DATEDIFF(Close Date,Let Date,day)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samarth&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 16:55:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216522#M52485</guid>
      <dc:creator>Samarth_18</dc:creator>
      <dc:date>2021-12-01T16:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate number of days between two date fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216792#M52495</link>
      <description>&lt;P&gt;This is the way. You&amp;nbsp;&lt;EM&gt;can&lt;/EM&gt; just subtract days (i.e. LetDate - CloseDate) since they are stored as the number of days since 12/30/1899 but &lt;A href="https://dax.guide/datediff/" target="_blank"&gt;DATEDIFF&lt;/A&gt; is more flexible and can easily handle other units too (SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235717" data-lia-user-login="g_hill" class="lia-mention lia-mention-user"&gt;g_hill&lt;/a&gt;&amp;nbsp;The &lt;A href="https://dax.guide/datesbetween/" target="_blank"&gt;DATESBETWEEN&lt;/A&gt; function is for Time Intelligence and returns a&amp;nbsp;&lt;EM&gt;table of date values&lt;/EM&gt;&amp;nbsp;between two dates rather than a single number. It's generally used for filtering.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 21:05:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-number-of-days-between-two-date-fields/m-p/2216792#M52495</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-12-01T21:05:31Z</dc:date>
    </item>
  </channel>
</rss>

