<?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: How to calculate subtotal correctly with hierarchies in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4585607#M175678</link>
    <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343460" data-lia-user-login="Asmoday1507" class="lia-mention lia-mention-user"&gt;Asmoday1507&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;If these also don't help, please share more detailed information and description to help us clarify your scenario to test.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2025 06:08:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-02-26T06:08:38Z</dc:date>
    <item>
      <title>How to calculate subtotal correctly with hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4417137#M175399</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am struggling with the following problem. I have a fact table in which I already receive calculated values per category and subcategory in one table. The totals per category and subcategory do not and should not be equal.&lt;/P&gt;&lt;P&gt;Let's assume we have category A, which is divided into 3 subcategories: AA, AB, AC. The entire category A is supposed to have a subtotal of 370, and the subcategory AA is 50, AB 100 and AC 200. The sum of the subcategories is 350, but I would not like to see 350, but 370.&lt;/P&gt;&lt;P&gt;I already receive the calculated data from the backend layer:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Since I have one column with values that simultaneously contains the sum of the entire category and the subcategory values, the whole thing is duplicated in the sums. How can I approach this differently?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is an example, the real case has a category and a tree with 8 levels of subcategories, so it is very important for me that the solution is calculated correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 07:12:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4417137#M175399</guid>
      <dc:creator>Asmoday1507</dc:creator>
      <dc:date>2025-02-19T07:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate subtotal correctly with hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4417175#M175401</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can use ISINSCOPE to change the calculation logic depeding on the level of the visualization. E.g.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt; &lt;SPAN&gt;32&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;ISINSCOPE&lt;/SPAN&gt;&lt;SPAN&gt;('Table (48)'[Subcategory]),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Table (48)'[Value]),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Table (48)'[Value]),'Table (48)'[Subcategory] &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;"A"&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;}))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
This will give the sum of subcategory A in total level an in the subcategory level the values are shown as normal.&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Feb 2025 07:31:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4417175#M175401</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2025-02-19T07:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate subtotal correctly with hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4417187#M175402</link>
      <description>&lt;P&gt;Yes, Isinscope dax function is useful, but I don't want to see value from A in my table, value for A is only calculated subtotal in backend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Also it's only an example, real scenario has a tree with 8 subcategories, 8 subsubcategories etc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 07:35:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4417187#M175402</guid>
      <dc:creator>Asmoday1507</dc:creator>
      <dc:date>2025-02-19T07:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate subtotal correctly with hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4418561#M175448</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343460" data-lia-user-login="Asmoday1507" class="lia-mention lia-mention-user"&gt;Asmoday1507&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Did you mean to calculate with category fields but not really use this in the visual axis?&lt;BR /&gt;If that is the case, you may need to add variable in measure to restore the current category group and calculate correspond result.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/all-the-secrets-of-summarize/" target="_blank"&gt;All the secrets of SUMMARIZE - SQLBI&lt;/A&gt;&lt;BR /&gt;Then you can lookup above variable table and filter records based on current row contexts.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 01:38:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4418561#M175448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-20T01:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate subtotal correctly with hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4420536#M175506</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343460" data-lia-user-login="Asmoday1507" class="lia-mention lia-mention-user"&gt;Asmoday1507&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your table is already structured as a matrix. Just put it in a table visual and will display as a matrix.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 21:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4420536#M175506</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2025-02-20T21:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate subtotal correctly with hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4585607#M175678</link>
      <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343460" data-lia-user-login="Asmoday1507" class="lia-mention lia-mention-user"&gt;Asmoday1507&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;If these also don't help, please share more detailed information and description to help us clarify your scenario to test.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 06:08:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-subtotal-correctly-with-hierarchies/m-p/4585607#M175678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-26T06:08:38Z</dc:date>
    </item>
  </channel>
</rss>

