<?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 Count Days Between Two Dates in Same Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122330#M110790</link>
    <description>&lt;P&gt;I am building reports in powerbi using an established data model where the security in place prevents the ability to add columns; thus I must develop a measure to calculate the number of days between two dates within the same column (i.e., previous row).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with a date field and I would like to calculate the number of days between each event (occurrence) (e.g., number of days between 03/08/2022 and 05/17/2022; number of days between 05/17/2022 and 06/06/2022, etc.).&amp;nbsp; Is there a way to do this by using a measure?&amp;nbsp; Any help/advice you can give would be very much appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;EventDate Field&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;03/08/2022&lt;/P&gt;&lt;P&gt;05/17/2022&lt;/P&gt;&lt;P&gt;06/06/2022&lt;/P&gt;&lt;P&gt;07/12/2022&lt;/P&gt;&lt;P&gt;09/29/2022&lt;/P&gt;&lt;P&gt;02/07/2023&lt;/P&gt;&lt;P&gt;02/08/2023&lt;/P&gt;&lt;P&gt;02/20/2023&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 19:21:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-03-09T19:21:44Z</dc:date>
    <item>
      <title>Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122330#M110790</link>
      <description>&lt;P&gt;I am building reports in powerbi using an established data model where the security in place prevents the ability to add columns; thus I must develop a measure to calculate the number of days between two dates within the same column (i.e., previous row).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with a date field and I would like to calculate the number of days between each event (occurrence) (e.g., number of days between 03/08/2022 and 05/17/2022; number of days between 05/17/2022 and 06/06/2022, etc.).&amp;nbsp; Is there a way to do this by using a measure?&amp;nbsp; Any help/advice you can give would be very much appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;EventDate Field&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;03/08/2022&lt;/P&gt;&lt;P&gt;05/17/2022&lt;/P&gt;&lt;P&gt;06/06/2022&lt;/P&gt;&lt;P&gt;07/12/2022&lt;/P&gt;&lt;P&gt;09/29/2022&lt;/P&gt;&lt;P&gt;02/07/2023&lt;/P&gt;&lt;P&gt;02/08/2023&lt;/P&gt;&lt;P&gt;02/20/2023&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 19:21:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122330#M110790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-09T19:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122340#M110792</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;doable. would need the info of other columns to locate date rows. could you enrich your data sample?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 19:25:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122340#M110792</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-09T19:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122354#M110794</link>
      <description>&lt;P&gt;Other columns, as a minimum, would include:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unique Identifier Field (each record/row)&lt;/P&gt;&lt;P&gt;Eventdate (referenced originally)&lt;/P&gt;&lt;P&gt;Title Field&lt;/P&gt;&lt;P&gt;Event Summary Field&lt;/P&gt;&lt;P&gt;Responsible Department Field&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 19:30:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122354#M110794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-09T19:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122401#M110798</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the criteria to pick dates for duration calculation?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 19:52:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122401#M110798</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-09T19:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122411#M110799</link>
      <description>&lt;P&gt;To include on a visual whether table, combo graph (bar (event) line (days between events)&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 19:53:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122411#M110799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-09T19:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122444#M110806</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Try to plot a table visual with&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;UniqueIdentifier and a measure like:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;daysbetween =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _date = MAX(TableName[EventDate])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _datepre =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MAXX(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ALL(TableName[EventDate]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TableName[EventDate]&amp;lt;_date&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;),&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; TableName[EventDate]&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATEDIFF(_datepre,&amp;nbsp;_date, DAY)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 Mar 2023 20:04:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122444#M110806</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-09T20:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days Between Two Dates in Same Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122446#M110807</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; I will try this!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 20:05:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Days-Between-Two-Dates-in-Same-Column/m-p/3122446#M110807</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-09T20:05:55Z</dc:date>
    </item>
  </channel>
</rss>

