<?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: DATE DIFF Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3068003#M106305</link>
    <description>&lt;P&gt;Thanks and much apperciated&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 06:42:07 GMT</pubDate>
    <dc:creator>anwargabr</dc:creator>
    <dc:date>2023-02-08T06:42:07Z</dc:date>
    <item>
      <title>DATE DIFF Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3056105#M105434</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need help to write DAX measure or variables calculating the DATE differnce as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if "FROM" not qual to "ISSUE DATE",&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;calculate the DAT FIFF in column "FROM" at any date with the previous date "Dates"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;th eresult shoul be&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;all "form" 30/3 should be ignored as from = issue&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;DATES “1/10, 25/11, 26/11 and 28/11" diff will be ZERO&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;DATES 30/9 and 27/11 will be difference.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 20:15:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3056105#M105434</guid>
      <dc:creator>anwargabr</dc:creator>
      <dc:date>2023-02-01T20:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: DATE DIFF Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3056892#M105485</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="254519" data-lia-user-login="anwargabr" class="lia-mention lia-mention-user"&gt;anwargabr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I have created a simple sample, please refer to my pbix file to see if it helps you.&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _1=CALCULATE(MAX('Table'[dates]),FILTER(ALL('Table'),'Table'[Index]=SELECTEDVALUE('Table'[Index])-1))

return 
IF(MAX('Table'[From])=SELECTEDVALUE('Table'[issue date]),BLANK(),DATEDIFF(_1,MAX('Table'[From]),DAY))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 05:29:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3056892#M105485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-02T05:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: DATE DIFF Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3057743#M105542</link>
      <description>&lt;P&gt;Dear Polly,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help, actually the calculation is wrong as the results should be&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I've attached the excel file for my saple data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://alkhorayefcrm-my.sharepoint.com/:x:/g/personal/agabr_alkhorayef_com/EZ-VmcE83FtCoOQ0Gh8dk6ABnao1Avnu7oh7Kd3cdlowNg?e=QTDDZb" target="_blank"&gt;test DATE DIFF.xlsx&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 12:05:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3057743#M105542</guid>
      <dc:creator>anwargabr</dc:creator>
      <dc:date>2023-02-02T12:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: DATE DIFF Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3059218#M105623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="254519" data-lia-user-login="anwargabr" class="lia-mention lia-mention-user"&gt;anwargabr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try to change the measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = var _1=CALCULATE(MAX('Table'[From]),FILTER(ALL('Table'),'Table'[Index]=SELECTEDVALUE('Table'[Index])-1))

return 
IF(MAX('Table'[From])=SELECTEDVALUE('Table'[issue date]),BLANK(),DATEDIFF(_1,MAX('Table'[From]),DAY))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 00:59:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3059218#M105623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-03T00:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: DATE DIFF Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3068003#M106305</link>
      <description>&lt;P&gt;Thanks and much apperciated&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 06:42:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATE-DIFF-Measure/m-p/3068003#M106305</guid>
      <dc:creator>anwargabr</dc:creator>
      <dc:date>2023-02-08T06:42:07Z</dc:date>
    </item>
  </channel>
</rss>

