<?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: Aggregate measure subtotal by rank of relationship amount in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3393629#M127981</link>
    <description>&lt;P&gt;Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 00:45:43 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-08-23T00:45:43Z</dc:date>
    <item>
      <title>Aggregate measure subtotal by rank of relationship amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3390886#M127830</link>
      <description>&lt;P&gt;I am looking to create a rolling sum of the below table.&amp;nbsp; For example, the new measure would be $390,170 for first row, then 834,590 for the second row. The measure should function and "re-rank" based on the relationship names within the view (filtered)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amount is a calculated measure performing average of a calculated column (rate * total amount) minus a single filtered relationship name as the base value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;</description>
      <pubDate>Mon, 21 Aug 2023 19:12:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3390886#M127830</guid>
      <dc:creator>Reisae</dc:creator>
      <dc:date>2023-08-21T19:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate measure subtotal by rank of relationship amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3393629#M127981</link>
      <description>&lt;P&gt;Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 00:45:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3393629#M127981</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-08-23T00:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate measure subtotal by rank of relationship amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3393715#M127989</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="606080" data-lia-user-login="Reisae" class="lia-mention lia-mention-user"&gt;Reisae&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want to get the rolling of the [Amount] sort by the filtered [Relationship Name].&lt;/P&gt;
&lt;P&gt;For your need , i recommand you to use the slicer to filter the&amp;nbsp;[Relationship Name] so that we can use the ALLSELECTEED() function to get the filter .&lt;/P&gt;
&lt;P&gt;Here are the steps you can refer to :&lt;BR /&gt;(1)This is my test data, i create a [Amount] measure to simulate your situation.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2)Then we can create a measure like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling Measure = var _t =  ADDCOLUMNS( ALLSELECTED('Table'[Relationship Name]) , "Amount" , [Amount]     )
var  _t2 = ADDCOLUMNS(_t , "flag" ,RANK(DENSE,_t,ORDERBY([Amount],ASC,[Relationship Name],ASC))    )
var _cur_Name= VALUES('Table'[Relationship Name])
var _cur_falg =MAXX( FILTER(_t2 , [Relationship Name] in _cur_Name) , [flag])
return
SUMX(FILTER( _t2 ,[flag] &amp;lt;=  _cur_falg) , [Amount])
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(3)Then we can put the fields we need on the visual and we can get the result as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And when we filter on the slicer , it will also work .&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 01:45:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-measure-subtotal-by-rank-of-relationship-amount/m-p/3393715#M127989</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-08-23T01:45:14Z</dc:date>
    </item>
  </channel>
</rss>

