<?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: Dateadd inside datediff in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983762#M12044</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
var _endDate = IF(ISBLANK([Date1]), IF(ISBLANK([Date2]), [DateUpdated],[Date2]) ,[Date1])
RETURN
DATEDIFF(DATEADD([DateUpdated], -1, MONTH), _endDate, MONTH)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 20 Mar 2020 09:47:55 GMT</pubDate>
    <dc:creator>az38</dc:creator>
    <dc:date>2020-03-20T09:47:55Z</dc:date>
    <item>
      <title>Dateadd inside datediff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983718#M12042</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could somebody please help me convert my SQL query to DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateDiff(month, dateadd(month, -1, DateUpdated), Isnull(Date1, IsNull(Date2, DateUpdated)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Liam&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 09:28:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983718#M12042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dateadd inside datediff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983762#M12044</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
var _endDate = IF(ISBLANK([Date1]), IF(ISBLANK([Date2]), [DateUpdated],[Date2]) ,[Date1])
RETURN
DATEDIFF(DATEADD([DateUpdated], -1, MONTH), _endDate, MONTH)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Mar 2020 09:47:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983762#M12044</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-20T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dateadd inside datediff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983775#M12045</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Date 1 and Date 2 are both fields from calculation columns and its only suggesting measure values on intellisense?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, could you please advise on how the measure would be If I was to sum total rows and get a count of rows that had this specified datediff below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Liam&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 09:57:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983775#M12045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T09:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dateadd inside datediff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983782#M12046</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if your Date1 and Date2 are calculated columns my advice is to create a calculated column, not easure for datediff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For second task try a technique like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure = 
calculate(COUNTROWS(Table), ALLEXCEPT(Table, Table[DatediffColumn]))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Mar 2020 10:01:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983782#M12046</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-20T10:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dateadd inside datediff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983813#M12049</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this currently, and I've decided on putting a 1 in the cell if its applicable.&lt;/P&gt;&lt;P&gt;They are all displaying as 1 with this formula. Can you spot anything incorrect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DueCurrentMonth = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _endDate = IF(ISBLANK([Date1]), IF(ISBLANK([Date2]), [DateUpdated],[Date2]) ,[Date1])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;IF(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATEDIFF(DATEADD(vw1[DateUpdated],-1, MONTH), _endDate, MONTH) = 0, 1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Mar 2020 10:13:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983813#M12049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T10:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dateadd inside datediff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983817#M12050</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i will not be able to help you without data example&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 10:14:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dateadd-inside-datediff/m-p/983817#M12050</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-20T10:14:26Z</dc:date>
    </item>
  </channel>
</rss>

