<?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: DateDiff in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2165168#M50148</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;When a Measure is used on rows in a table, the column total for those rows is not calculated as a sum of the results in the rows, but instead it calculates using the same Measure formula and applies it to the total of the data selected. Due to this feature, the total value may be unexpected. In such case, you may do further calculation and correct the total value. Please try the Measure below and use it to create your visual instead of using DIAS PARADOS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Correct_total = SUMX (&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUMMARIZE(SUSE,SUSE[Data/Hora Conclusão da atividade]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUSE[DIAS PARADOS]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, the result will look like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Nov 2021 01:21:03 GMT</pubDate>
    <dc:creator>v-cazheng-msft</dc:creator>
    <dc:date>2021-11-01T01:21:03Z</dc:date>
    <item>
      <title>DateDiff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2161036#M49957</link>
      <description>&lt;P&gt;Bom dia a comunidade...&lt;BR /&gt;&lt;BR /&gt;Preciso de ajuda quanto ao relatório que estraí utilizando o comando DateDiff.&lt;BR /&gt;&lt;BR /&gt;O que devo fazer para somar os total dos dias por área ?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Não entendo o resultado negativo em -83 dias.&lt;/P&gt;&lt;P&gt;Formula utilizada.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIAS PARADOS = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUSE[Data/Hora Conclusão da atividade]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUSE[Data/Hora Início da atividade]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUSE[Data/Hora Início da atividade]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUSE[Data/Hora Conclusão da atividade]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Agradeço a ajuda.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 14:32:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2161036#M49957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-28T14:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2164082#M50077</link>
      <description>&lt;P&gt;What is your expected result?&amp;nbsp;Think like the Grand Total. Very often measures designed for the Grand Total will also work for the Row and Column Totals and for the individual cells.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 00:48:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2164082#M50077</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-10-30T00:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: DateDiff</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2165168#M50148</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;When a Measure is used on rows in a table, the column total for those rows is not calculated as a sum of the results in the rows, but instead it calculates using the same Measure formula and applies it to the total of the data selected. Due to this feature, the total value may be unexpected. In such case, you may do further calculation and correct the total value. Please try the Measure below and use it to create your visual instead of using DIAS PARADOS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Correct_total = SUMX (&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUMMARIZE(SUSE,SUSE[Data/Hora Conclusão da atividade]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUSE[DIAS PARADOS]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, the result will look like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 01:21:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateDiff/m-p/2165168#M50148</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2021-11-01T01:21:03Z</dc:date>
    </item>
  </channel>
</rss>

