<?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: HELP!! DAX : Date Diff in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3591227#M138651</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="601759" data-lia-user-login="Newbie12345" class="lia-mention lia-mention-user"&gt;Newbie12345&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Use this measure as a calculated column in your table and make sure to change the table name as per yours:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date Diff = 
VAR __MaxDate = 
    CALCULATE(
        MAX( Table03[Date] ) , 
        ALLEXCEPT(Table03 , Table03[ID] , Table03[Category] )
    )
VAR __PrevDate = 
    CALCULATE(
        MAX( Table03[Date] ) , 
        Table03[Date] &amp;lt; __MaxDate,
        ALLEXCEPT(Table03 , Table03[ID] , Table03[Category] )
    )
RETURN
    IF( Table03[Date] =  __MaxDate &amp;amp;&amp;amp; __PrevDate &amp;lt;&amp;gt; BLANK() ,INT (__MaxDate - __PrevDate ) ) &lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 19 Dec 2023 12:34:17 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2023-12-19T12:34:17Z</dc:date>
    <item>
      <title>HELP!! DAX : Date Diff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3591112#M138647</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;Please help me around with the below query.&lt;BR /&gt;Topic: DAX&lt;BR /&gt;Query:&lt;BR /&gt;I want to calculate the date diff between 2 dates ( of each category) , attaching the screen-shot for your kind reference.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 04:52:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3591112#M138647</guid>
      <dc:creator>Newbie12345</dc:creator>
      <dc:date>2023-12-22T04:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: HELP!! DAX : Date Diff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3591227#M138651</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="601759" data-lia-user-login="Newbie12345" class="lia-mention lia-mention-user"&gt;Newbie12345&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Use this measure as a calculated column in your table and make sure to change the table name as per yours:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date Diff = 
VAR __MaxDate = 
    CALCULATE(
        MAX( Table03[Date] ) , 
        ALLEXCEPT(Table03 , Table03[ID] , Table03[Category] )
    )
VAR __PrevDate = 
    CALCULATE(
        MAX( Table03[Date] ) , 
        Table03[Date] &amp;lt; __MaxDate,
        ALLEXCEPT(Table03 , Table03[ID] , Table03[Category] )
    )
RETURN
    IF( Table03[Date] =  __MaxDate &amp;amp;&amp;amp; __PrevDate &amp;lt;&amp;gt; BLANK() ,INT (__MaxDate - __PrevDate ) ) &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 19 Dec 2023 12:34:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3591227#M138651</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2023-12-19T12:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: HELP!! DAX : Date Diff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3592940#M138741</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="601759" data-lia-user-login="Newbie12345" class="lia-mention lia-mention-user"&gt;Newbie12345&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;make a new column using below code&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
var a = 'Table'[date]
var b = 'Table'[id]
var c= 'Table'[category]
var d = MAXX(FILTER('Table','Table'[date]&amp;lt;a &amp;amp;&amp;amp; 'Table'[category]=c &amp;amp;&amp;amp; 'Table'[id]=b),'Table'[date]) 
var e=  IF(d=BLANK(),'Table'[date],d)
var f= CONVERT('Table'[date]-e,INTEGER)
return
f&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just adjust table and column name&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 07:03:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HELP-DAX-Date-Diff/m-p/3592940#M138741</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-12-20T07:03:47Z</dc:date>
    </item>
  </channel>
</rss>

