<?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: Power BI Report Builder - Total of Top N by Group Filtering in Matrix in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3362573#M30744</link>
    <description>&lt;P&gt;Please assist me if possible, I'll be grateful to you.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 23:07:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-02T23:07:00Z</dc:date>
    <item>
      <title>Power BI Report Builder - Total of Top N by Group Filtering in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3332474#M30537</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope all is well.&lt;/P&gt;&lt;P&gt;I am working on a paginated report which contains a matrix made of&lt;/P&gt;&lt;P&gt;&amp;nbsp;two Row groups having&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Main Category as a Parent Group and&lt;/LI&gt;&lt;LI&gt;Area as&amp;nbsp;Child Group&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;and have a 1 column group of Report Date with a column named "current date" &amp;amp; "previous date".&lt;/P&gt;&lt;P&gt;The resultant needs to be top 10 Area which was easy to achieve but the issue is unable to calculate the Grand total of top 10 returning Areas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would really appreciate if anyone can assist me in this regard and let me know how to calculate the Grand Total of Top 10 Areas in a matrix.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 22:37:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3332474#M30537</guid>
      <dc:creator>IK181</dc:creator>
      <dc:date>2023-07-15T22:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Builder - Total of Top N by Group Filtering in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3333098#M30538</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="589632" data-lia-user-login="IK181" class="lia-mention lia-mention-user"&gt;IK181&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Define a custom code function in the report:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dim TotalTop10Areas As Integer = 0

Public Function AddToTotalTop10Areas(ByVal value As Integer) As Integer
    TotalTop10Areas = TotalTop10Areas + value
    Return value
End Function

Public Function GetGrandTotalTop10Areas() As Integer
    Return TotalTop10Areas
End Function&lt;/LI-CODE&gt;&lt;P&gt;2. Add a textbox to your report where you want to display the grand total. In the Value property of the textbox:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Code.GetGrandTotalTop10Areas()&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;3. In the cell of the matrix where you want to calculate the top 10 areas, add a custom expression to handle the top 10 calculation&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Code.AddToTotalTop10Areas(Sum(Fields!ValueToSum.Value))&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;4.&amp;nbsp;Sort the matrix rows by the sum of the values in descending order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Should you need further assistance please don't hesitate to reach out to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 18:50:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3333098#M30538</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2023-07-16T18:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Builder - Total of Top N by Group Filtering in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3362571#M30743</link>
      <description>&lt;P&gt;Thank you for the assistance, Sahir.&amp;nbsp;&lt;BR /&gt;However, the given solution isn't returning the filtered rows total.&lt;BR /&gt;&lt;BR /&gt;I have tried your solution for Top 2 rows, keeping everthing quite simple.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is the design view: I have chosen Branch Banking in the Main Category group only.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the resultant view: Sum should be 7 instead of 9.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 23:05:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3362571#M30743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T23:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Builder - Total of Top N by Group Filtering in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3362573#M30744</link>
      <description>&lt;P&gt;Please assist me if possible, I'll be grateful to you.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 23:07:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Builder-Total-of-Top-N-by-Group-Filtering-in/m-p/3362573#M30744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T23:07:00Z</dc:date>
    </item>
  </channel>
</rss>

