<?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: Custom Subtotals in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3398245#M44084</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/608117"&gt;@mestra25&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to use the following DAX functions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ISINSCOPE to determine whether you are calcualting the grand total&lt;/LI&gt;&lt;LI&gt;CALCULATE to exclude&amp;nbsp;&lt;SPAN&gt;"Unallocated Strategic Investments"&amp;nbsp;if you are in the grand total&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Assuming the top level in your rows hierarchy is the column 'Table'[Entity] then this would be the new measure that you would create for the [CM Adj Bgt] measure (for all other measures accordingly):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CM Adj Bgt New Total =
IF (
    NOT ( ISINSCOPE ( 'Table'[Entity] ) ),
    CALCUALTE (
        [CM Adj Bgt],
        KEEPFILTERS ( 'Table'[Entity] &amp;lt;&amp;gt; "Unallocated Strategic Investments" )
    ),
    [CM Adj Bgt]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="github.png" style="width: 34px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933704i8348AD2A9C7A3ED4/image-dimensions/34x34?v=v2" width="34" height="34" role="button" title="github.png" alt="github.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="linkedin.png" style="width: 36px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933703i7ADBF83A4A253887/image-dimensions/36x31?v=v2" width="36" height="31" role="button" title="linkedin.png" alt="linkedin.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 03:03:58 GMT</pubDate>
    <dc:creator>Martin_D</dc:creator>
    <dc:date>2023-08-25T03:03:58Z</dc:date>
    <item>
      <title>Custom Subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3398066#M44080</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a dashboard and I wanted to remove a column from the over all total, and add it back at the end. How can I accomplish this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mestra25_0-1692922255273.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/960182i8E56114CE0FDE33D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mestra25_0-1692922255273.png" alt="mestra25_0-1692922255273.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this instance, I would want to remove "Unallocated Strategic Investments" from the Total, turn that total into a "Sub Total", and then add "Unallocaed Strategic Investments" back into the subtotal to create a new grand total.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 00:12:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3398066#M44080</guid>
      <dc:creator>mestra25</dc:creator>
      <dc:date>2023-08-25T00:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3398245#M44084</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/608117"&gt;@mestra25&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to use the following DAX functions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ISINSCOPE to determine whether you are calcualting the grand total&lt;/LI&gt;&lt;LI&gt;CALCULATE to exclude&amp;nbsp;&lt;SPAN&gt;"Unallocated Strategic Investments"&amp;nbsp;if you are in the grand total&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Assuming the top level in your rows hierarchy is the column 'Table'[Entity] then this would be the new measure that you would create for the [CM Adj Bgt] measure (for all other measures accordingly):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CM Adj Bgt New Total =
IF (
    NOT ( ISINSCOPE ( 'Table'[Entity] ) ),
    CALCUALTE (
        [CM Adj Bgt],
        KEEPFILTERS ( 'Table'[Entity] &amp;lt;&amp;gt; "Unallocated Strategic Investments" )
    ),
    [CM Adj Bgt]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="github.png" style="width: 34px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933704i8348AD2A9C7A3ED4/image-dimensions/34x34?v=v2" width="34" height="34" role="button" title="github.png" alt="github.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="linkedin.png" style="width: 36px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933703i7ADBF83A4A253887/image-dimensions/36x31?v=v2" width="36" height="31" role="button" title="linkedin.png" alt="linkedin.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 03:03:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3398245#M44084</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-08-25T03:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3399509#M44101</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/578180"&gt;@Martin_D&lt;/a&gt;&amp;nbsp;Thanks for this. Now, is there a way to add "Unallocated Strategic Invesments to this subtotal and get a new grand total, like the below where the subtotal is the sum of all other entities and then I add back unallocated Strateigc investments?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mestra25_0-1692979953483.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/960580i22C34F6B23F91AD8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mestra25_0-1692979953483.png" alt="mestra25_0-1692979953483.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 16:13:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3399509#M44101</guid>
      <dc:creator>mestra25</dc:creator>
      <dc:date>2023-08-25T16:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3399837#M44105</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/608117"&gt;@mestra25&lt;/a&gt;&amp;nbsp;you would solve more complex scenarios with a mapping table rather than writing more and more DAX code. The mapping table would assign which numbers go into which lines. Think like the numbers being assigned to general ledger accounts. Then the numbers in each line are calculated as a sum of different G/L accounts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Line ID&lt;/TD&gt;&lt;TD&gt;Line Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Subtotal&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Unallocated Stratgic Investment&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Grand Total&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mapping &lt;EM&gt;(m:n)&lt;/EM&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Line ID&lt;/TD&gt;&lt;TD&gt;G/L Account No.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;111111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;222222&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;333333&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;111111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;222222&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;333333&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;G/L Account&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;G/L Account No.&lt;/TD&gt;&lt;TD&gt;G/L Account Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;111111&lt;/TD&gt;&lt;TD&gt;Account A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;222222&lt;/TD&gt;&lt;TD&gt;Account B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;333333&lt;/TD&gt;&lt;TD&gt;Unallocated Stratgic Investment&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;G/L Entries&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;G/L Account No.&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023-04-07&lt;/TD&gt;&lt;TD&gt;111111&lt;/TD&gt;&lt;TD&gt;300.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023-04-15&lt;/TD&gt;&lt;TD&gt;222222&lt;/TD&gt;&lt;TD&gt;5.95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023-04-17&lt;/TD&gt;&lt;TD&gt;333333&lt;/TD&gt;&lt;TD&gt;8.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023-04-17&lt;/TD&gt;&lt;TD&gt;222222&lt;/TD&gt;&lt;TD&gt;150.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2023-04-30&lt;/TD&gt;&lt;TD&gt;111111&lt;/TD&gt;&lt;TD&gt;50.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;EM&gt;Example&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The relationsships are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;unidirectional one to many between Line and Mapping&lt;/LI&gt;&lt;LI&gt;bidirectional many to one between Mapping and G/L Account&lt;/LI&gt;&lt;LI&gt;unidirection ont to many between G/L Account and G/L Entries&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the measure is just SUM('G/L Entries'[Amount]) everything else is done by the relationships.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="github.png" style="width: 34px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933704i8348AD2A9C7A3ED4/image-dimensions/34x34?v=v2" width="34" height="34" role="button" title="github.png" alt="github.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="linkedin.png" style="width: 36px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933703i7ADBF83A4A253887/image-dimensions/36x31?v=v2" width="36" height="31" role="button" title="linkedin.png" alt="linkedin.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 20:10:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Subtotals/m-p/3399837#M44105</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-08-25T20:10:52Z</dc:date>
    </item>
  </channel>
</rss>

