<?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: Total sum error with sum filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774430#M86532</link>
    <description>&lt;P&gt;It kind of worked, but now when I talk about big dates it brings me a very large amount of the released,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Do I have to do something to that extent for it to get a filter?&lt;/P&gt;&lt;P&gt;Or for example, I have a release on 08/01/2022, so I go ahead and go back 41 days, which is between the period we did in the measure of DataMin, DataMax.&lt;/P&gt;&lt;P&gt;I just apply a filter of Year and month times.&lt;/P&gt;&lt;P&gt;On 01/08/2002 I launched 27800, but it is saying that I sold 282,924, even though the field Cadastro_Material[Material Parent] would be the product code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm sorry for this.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 19:15:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-16T19:15:16Z</dc:date>
    <item>
      <title>Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2773933#M86482</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having problems summing the total of the tables, I have 2 products that have 2 release dates, it was launched with a quantity on each date, then I need to know how its sales performance was, but for example, I have a sales total in a period 636 sales.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I'm using this measurement:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Varejo 4 Sem = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;VAR DataLancamento = MAX(Lancamento_Vermelha[DT_Lançamento])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;VAR DataMax = DataLancamento + 41&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;VAR DataMin = DataLancamento + 41&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; CALCULATE(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Venda Fisica],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;DATESBETWEEN(Calendario[Data],MIN(Lancamento_Vermelha[DT_Lançamento])-41,MAX(Lancamento_Vermelha[DT_Lançamento])+41)))&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:20:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2773933#M86482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T15:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774011#M86488</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please try the following&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Varejo 4 Sem =
SUMX (
    VALUES ( Lancamento_Vermelha[Material Pai] ),
    CALCULATE (
        VAR DataLancamento =
            MAX ( Lancamento_Vermelha[DT_Lançamento] )
        VAR DataMax = DataLancamento + 41
        VAR DataMin = DataLancamento - 41
        RETURN
            CALCULATE (
                [Venda Fisica],
                DATESBETWEEN ( Calendario[Data], DataMin, DataMax )
            )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:53:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774011#M86488</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T15:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774162#M86505</link>
      <description>&lt;P&gt;It still hasn't happened, in fact I think the error is in the VAR DataLaunching, because if I put MAX, it brings me the value of 08/22/2021, and if I put the minimum it brings me the value of 11/15/2021 .&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;how do i return exactly then the date in question?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:13:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774162#M86505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T17:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774170#M86507</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;would you please copy/paste the code so I can edit?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:17:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774170#M86507</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T17:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774183#M86510</link>
      <description>&lt;P&gt;sorry, how do i do that?&amp;nbsp;what code ?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:21:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774183#M86510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T17:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774196#M86512</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;The [Varejo 4 Sem] measure. Please copy the dax formula and paste it in a reply so I can edit.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:26:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774196#M86512</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T17:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774213#M86515</link>
      <description>&lt;LI-CODE lang="markup"&gt;Atacado 4 Sem = 
   VAR DataLancamento = MAX(Lancamento_Vermelha[DT_Lançamento])
   VAR DataMax = DataLancamento + 28
   VAR DataMin = DataLancamento - 41
RETURN
    SUMX(
        VALUES(Cadastro_Material[Material Pai]),
    CALCULATE(
        [Venda Fisica Atacado],        DATESBETWEEN(Calendario[Data],MIN(Lancamento_Vermelha[DT_Lançamento])-41,MAX(Lancamento_Vermelha[DT_Lançamento])+28)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so ?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:31:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774213#M86515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T17:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774255#M86518</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Atacado 4 Sem =
SUMX (
    SUMMARIZE (
        Cadastro_Material,
        Cadastro_Material[Material Pai],
        Cadastro_Material[DT_Lancamento]
    ),
    CALCULATE (
        VAR DataLancamento =
            MAX ( Lancamento_Vermelha[DT_Lançamento] )
        VAR DataMax = DataLancamento + 28
        VAR DataMin = DataLancamento - 41
        RETURN
            CALCULATE (
                [Venda Fisica Atacado],
                DATESBETWEEN ( Calendario[Data], DataLancamento, DataMax )
            )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774255#M86518</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T17:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774430#M86532</link>
      <description>&lt;P&gt;It kind of worked, but now when I talk about big dates it brings me a very large amount of the released,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Do I have to do something to that extent for it to get a filter?&lt;/P&gt;&lt;P&gt;Or for example, I have a release on 08/01/2022, so I go ahead and go back 41 days, which is between the period we did in the measure of DataMin, DataMax.&lt;/P&gt;&lt;P&gt;I just apply a filter of Year and month times.&lt;/P&gt;&lt;P&gt;On 01/08/2002 I launched 27800, but it is saying that I sold 282,924, even though the field Cadastro_Material[Material Parent] would be the product code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm sorry for this.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 19:15:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774430#M86532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T19:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774775#M86558</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry but I don't think I properly understand.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 03:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2774775#M86558</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-17T03:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum error with sum filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2776687#M86709</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure_Varejo 4 Sem =
var _table1=
SUMMARIZE('Lancamento_Vermelha','Lancamento_Vermelha'[DT_Lancamento],"Value",[Varejo 4 Sem])
return
IF(
    HASONEVALUE('Lancamento_Vermelha'[DT_Lancamento]),
    [Varejo 4 Sem],
    SUMX(_table1,[Value]))&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&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;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 06:34:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-error-with-sum-filters/m-p/2776687#M86709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-19T06:34:49Z</dc:date>
    </item>
  </channel>
</rss>

