<?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: Inaccurate Cumulative Sum in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504620#M134443</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511107" data-lia-user-login="Salle" class="lia-mention lia-mention-user"&gt;Salle&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this measure ,&lt;BR /&gt;&lt;BR /&gt;Measure=Calculate (Rejects+Scraps,Filter(All(Dimdate),Date column&amp;lt;=Max(Date))&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Thennarasu R&lt;BR /&gt;&lt;SPAN class=""&gt;If this post helps&amp;nbsp;then please consider accepeted the solution&lt;I&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 12:49:33 GMT</pubDate>
    <dc:creator>Thennarasu_R</dc:creator>
    <dc:date>2023-10-30T12:49:33Z</dc:date>
    <item>
      <title>Inaccurate Cumulative Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504578#M134442</link>
      <description>&lt;P&gt;Hi, having trouble getting the cumulative sum accurate. Filter issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setup:&lt;BR /&gt;Two tables: 'Rerun'[RejectCodeID];[Units]&amp;nbsp; and 'Scrap'[RejectCodeID]; [Units].&lt;/P&gt;&lt;P&gt;One to many: Dimension table 'RejectCode'[RejectCodeID]&lt;BR /&gt;&lt;BR /&gt;The Dax measure I use calculates the cumulative sum of rejects incorrectly after 116.&lt;BR /&gt;It sould been 35, 57, 77, 93, 105, 117, 118, 119, 120, 121, 122.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cumulative Rejects = 

VAR TotalRejects = [Reruns] + [Scrap]

Return

SUMX(
    FILTER(
        SUMMARIZE( ALLSELECTED('RejectCode'), 'RejectCode'[RejectCodeID], 
        "Rejects", [Scrap] + [Reruns] ),
         [Rejects] &amp;gt;= TotalRejects ),
         [Rejects] )&lt;/LI-CODE&gt;&lt;P&gt;Any ideas on what can be wrong?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 12:32:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504578#M134442</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-10-30T12:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Inaccurate Cumulative Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504620#M134443</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511107" data-lia-user-login="Salle" class="lia-mention lia-mention-user"&gt;Salle&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this measure ,&lt;BR /&gt;&lt;BR /&gt;Measure=Calculate (Rejects+Scraps,Filter(All(Dimdate),Date column&amp;lt;=Max(Date))&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Thennarasu R&lt;BR /&gt;&lt;SPAN class=""&gt;If this post helps&amp;nbsp;then please consider accepeted the solution&lt;I&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 12:49:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504620#M134443</guid>
      <dc:creator>Thennarasu_R</dc:creator>
      <dc:date>2023-10-30T12:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inaccurate Cumulative Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504662#M134445</link>
      <description>&lt;P&gt;It does not work.&lt;BR /&gt;I want to plot a pareto chart with RejectionCodeID as bars and Pareto curve as line. But first the cumulative sum must be accurate.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 13:09:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3504662#M134445</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-10-30T13:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Inaccurate Cumulative Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3509147#M134638</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511107" data-lia-user-login="Salle" class="lia-mention lia-mention-user"&gt;Salle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm suspecting you're trying to accumulate based on total largest to smallest, and you can check the results as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank = 
VAR _1=RANKX('Table (2)','Table (2)'[Total],,DESC,Dense) 

VAR _2 =
RANKX('Table (2)','Table (2)'[RejectCodeID],,ASC,Dense)/ POWER(10,ROUNDDOWN(COUNT('Table (2)'[RejectCodeID])/10,0)+1)
RETURN
_1 + _2

Cumulative Rejects = 
VAR TotalRejects = [Re] + [Sc]
Return
CALCULATE(
    SUM('Table (2)'[Total]),
    FILTER(
        ALLSELECTED('Table (2)'),
        'Table (2)'[Rank] &amp;lt;= MAX('Table (2)'[Rank])
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;An attachment for your reference. Hope it helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Scott Chang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 08:34:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Inaccurate-Cumulative-Sum/m-p/3509147#M134638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-01T08:34:54Z</dc:date>
    </item>
  </channel>
</rss>

