<?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: Cumulative sum measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4152296#M165020</link>
    <description>&lt;P&gt;Thank you so much for the response but ALLSELECTED didn't work in this case, I rewrote this measures a bit differently and now it works.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 11:31:24 GMT</pubDate>
    <dc:creator>Natalia2024</dc:creator>
    <dc:date>2024-09-16T11:31:24Z</dc:date>
    <item>
      <title>Cumulative sum measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4124668#M163776</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have the following cumulative sum measure which is built like that:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ArticleRank = RANKX(ALL(vdimarticle_v2),[Calculation KPI],,DESC,Dense)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;PercentageofTotal = 
var TotalKPI = CALCULATE([Calculation KPI],ALL(dimarticle))
RETURN
 DIVIDE([Calculation KPI],TotalKPI)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;CumulativeSumTop102 = 
var Top10Table = CALCULATETABLE(
                                  dimarticle_v2,
                                  FILTER(
                                    ALL(dimarticle_v2),
                                    [ArticleRank]&amp;lt;=30
                                  )
)
var CurrentArticleSum = [PercentageofTotal]
RETURN
    CALCULATE(
        [PercentageofTotal],
        FILTER(
            Top10Table,
            [PercentageofTotal]&amp;gt;=CurrentArticleSum
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;It works as follows, it ranks articles based on quantity and then it takes quantity of the first article and divides it by total quatity, for second article, it takes quantity of the first article + quantity of the second article and then&amp;nbsp; divides it by total quantity etc.&lt;/P&gt;&lt;P&gt;But I have problem if I filter sth on table dimarticle, because than measure shows incorrect numbers, do You know how to avoid this situation so allow users filtering on the table and make this cuulativesum be adjusted accordingly to the filters?&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Natalia&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 08:47:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4124668#M163776</guid>
      <dc:creator>Natalia2024</dc:creator>
      <dc:date>2024-08-29T08:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4124811#M163781</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="798827" data-lia-user-login="Natalia2024" class="lia-mention lia-mention-user"&gt;Natalia2024&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to modify you All(table) to AllSelected(table) so that the table works based on your slicers/filters. if still not work, share your dataset with sample data and desired output scenarions.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 10:04:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4124811#M163781</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2024-08-29T10:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4152296#M165020</link>
      <description>&lt;P&gt;Thank you so much for the response but ALLSELECTED didn't work in this case, I rewrote this measures a bit differently and now it works.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 11:31:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-measure/m-p/4152296#M165020</guid>
      <dc:creator>Natalia2024</dc:creator>
      <dc:date>2024-09-16T11:31:24Z</dc:date>
    </item>
  </channel>
</rss>

