<?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 subtotal in matrix table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3672522#M142476</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible in the visualisation with a matrix table to insert a subtotal under a specific row? For example&lt;/P&gt;&lt;P&gt;the matrix table shows that&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;but I need this&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;Thanks for any ideas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 09:12:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-01T09:12:58Z</dc:date>
    <item>
      <title>subtotal in matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3672522#M142476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible in the visualisation with a matrix table to insert a subtotal under a specific row? For example&lt;/P&gt;&lt;P&gt;the matrix table shows that&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;but I need this&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;Thanks for any ideas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:12:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3672522#M142476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-01T09:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal in matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3672630#M142481</link>
      <description>&lt;P&gt;In Power BI, you can use DAX (Data Analysis Expressions) to calculate subtotals in a matrix table. However, Power BI does not directly support inserting subtotals under specific rows in a matrix table like the Excel pivot table.&lt;/P&gt;&lt;P&gt;To achieve subtotaling under specific rows in a matrix table in Power BI, you can create calculated measures using DAX. Here's a general approach:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Define a measure for the subtotal&lt;/STRONG&gt;: Create a DAX measure that calculates the subtotal based on the rows you want to subtotal.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Modify the matrix table&lt;/STRONG&gt;: Add the subtotal measure to the matrix table and place it in the appropriate position.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's a basic example of how you can create a subtotal measure in DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Subtotal Measure =&lt;BR /&gt;VAR SelectedRows = VALUES('YourTableName'[RowField]) // Identify the rows you want to subtotal&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[YourExistingMeasure], // Your existing measure to subtotal&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('YourTableName'[RowField]), // All rows from the row field&lt;BR /&gt;'YourTableName'[RowField] IN SelectedRows // Filter rows for subtotal&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace 'YourTableName' with the name of your table and [RowField] with the column you are using to define rows in your matrix table. Also, replace [YourExistingMeasure] with the measure you want to subtotal.&lt;/P&gt;&lt;P&gt;For example, if you want to subtotal under the "Region" row in your matrix table, you can create a measure like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Region Subtotal =&lt;BR /&gt;VAR SelectedRegions = VALUES('YourTableName'[Region])&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Total Sales], // Assuming 'Total Sales' is your existing measure&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('YourTableName'[Region]), // All regions&lt;BR /&gt;'YourTableName'[Region] IN SelectedRegions // Filter regions for subtotal&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can add this measure to your matrix table in Power BI and place it under the "Region" row.&lt;/P&gt;&lt;P&gt;This approach allows you to calculate subtotals under specific rows in a matrix table in Power BI using DAX measures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:53:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3672630#M142481</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-02-01T09:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal in matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3673054#M142506</link>
      <description>&lt;P&gt;Hi, thanks for your help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have successfully created the subtotal according your example. But I can only display it in the matrix table under Values instead of Rows. I need the subtotal in Rows. There is no possibility, is there?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:56:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3673054#M142506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-01T13:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal in matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3673081#M142509</link>
      <description>&lt;P&gt;I found the solution by chance. create the subtotal with New Group.&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;thanks for the impulse&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_halo:"&gt;😇&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 14:09:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/subtotal-in-matrix-table/m-p/3673081#M142509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-01T14:09:50Z</dc:date>
    </item>
  </channel>
</rss>

