<?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: time difference in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1299005#M22467</link>
    <description>&lt;P&gt;This solved my problem:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Datediff-start-date-cannot-be-greater-than-the-end-date/td-p/108512#:~:text=Re%3A%20Datediff%20start%20date%20cannot%20be%20greater%20than%20the%20end%20date&amp;amp;text=Test%20your%20dates%20if%20the,function%20the%20other%20way%20round." target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Datediff-start-date-cannot-be-greater-than-the-end-date/td-p/108512#:~:text=Re%3A%20Datediff%20start%20date%20cannot%20be%20greater%20than%20the%20end%20date&amp;amp;text=Test%20your%20dates%20if%20the,function%20the%20other%20way%20round.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Aug 2020 16:09:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-16T16:09:35Z</dc:date>
    <item>
      <title>time difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298968#M22463</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 columns with the following data: picking date and faturation date. I want to know the time difference between these two processes but in some rows I dont have the picking date and in some rows I dont have the faturation date. So, I only want the time difference between orders that have the 2 fields and if I dont have at least one field in one column, I want a message like "without dates".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can help?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 15:35:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298968#M22463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-16T15:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: time difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298973#M22464</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try creating a Calculated Column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Column =
IF (
    'Table'[picking date]
        &amp;lt;&amp;gt; BLANK ()
        &amp;amp;&amp;amp; 'Table'[faturation date]
            &amp;lt;&amp;gt; BLANK (),
    DATEDIFF (
        'Table'[picking date],
        'Table'[faturation date],
        DAY
    ),
    99999
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If any of the dates are not present it will return 99999. YOu cannot have text and number values in the same column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Incase you need time difference in hour, second, minutes, weeks&amp;nbsp; replace DAY by them. Refer the below guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dax.guide/datediff/" target="_blank"&gt;https://dax.guide/datediff/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Harsh Nathani&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 15:49:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298973#M22464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-16T15:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: time difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298974#M22465</link>
      <description>&lt;P&gt;Dear Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use this measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will work the best and also you will be able to filter by field using any drop down or slicer&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Date Diff = CALCULATE(IF(ISBLANK(SUMX(Sheet1,Sheet1[Picking Date ])) || ISBLANK(SUMX(Sheet1,Sheet1[faturation Date])),"no dATE" ,SUMX(Sheet1,DATEDIFF(Sheet1[Picking Date ] , Sheet1[faturation Date],DAY))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will do the job&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just use your table name in the place where i have used Sheet1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate a kudos and if this helped please accept as solution so our other brothers and sisters can get help from it &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If any more further doubt please let me know .&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thakur Sujit&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 16:03:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298974#M22465</guid>
      <dc:creator>Sujit_Thakur</dc:creator>
      <dc:date>2020-08-16T16:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: time difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298975#M22466</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try creating a Calculated Column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Column =
IF (
    'Table'[picking date]
        &amp;lt;&amp;gt; BLANK ()
        &amp;amp;&amp;amp; 'Table'[faturation date]
            &amp;lt;&amp;gt; BLANK (),
    DATEDIFF (
        'Table'[picking date],
        'Table'[faturation date],
        DAY
    ),
    99999
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If any of the dates are not present it will return 99999. YOu cannot have text and number values in the same column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Harsh Nathani&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 15:44:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1298975#M22466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-16T15:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: time difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1299005#M22467</link>
      <description>&lt;P&gt;This solved my problem:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Datediff-start-date-cannot-be-greater-than-the-end-date/td-p/108512#:~:text=Re%3A%20Datediff%20start%20date%20cannot%20be%20greater%20than%20the%20end%20date&amp;amp;text=Test%20your%20dates%20if%20the,function%20the%20other%20way%20round." target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Datediff-start-date-cannot-be-greater-than-the-end-date/td-p/108512#:~:text=Re%3A%20Datediff%20start%20date%20cannot%20be%20greater%20than%20the%20end%20date&amp;amp;text=Test%20your%20dates%20if%20the,function%20the%20other%20way%20round.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 16:09:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1299005#M22467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-16T16:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: time difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1299011#M22468</link>
      <description>&lt;P&gt;Dear&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;You can please atleast appreciate the solution authors by giving kudos&amp;nbsp; .&lt;BR /&gt;Both of above post are also correct solution , you can accept both of them as solution if you want.&lt;BR /&gt;Regards ,&lt;/P&gt;&lt;P&gt;thakur sujit&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 16:14:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/time-difference/m-p/1299011#M22468</guid>
      <dc:creator>Sujit_Thakur</dc:creator>
      <dc:date>2020-08-16T16:14:11Z</dc:date>
    </item>
  </channel>
</rss>

