<?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: Subtotals at a specific row level in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4177966#M165980</link>
    <description>&lt;P&gt;You haven't shared any informtion on your model, so that makes it hard to be specific, but the outline of solving is&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add rows for those subtotals to your category dimension&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Alter the measure that calculates the amount for a category&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Add conditional statements (IF or SWITCH)&lt;/LI&gt;
&lt;LI&gt;Test for context where there is one category value, like HASONEVALUE(dim_category[category])&lt;/LI&gt;
&lt;LI&gt;If the category value equals the custom subtotal, calculate the category, replacing the categories *&lt;/LI&gt;
&lt;LI&gt;for other cases calculate the amount as is&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;* CALCULATE(SUM(fact[amount]), ALL(dim_category[category]),&amp;nbsp;dim_category[category] IN ('SERVICI', 'COsti per etc', 'etc'))&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 12:12:26 GMT</pubDate>
    <dc:creator>sjoerdvn</dc:creator>
    <dc:date>2024-09-26T12:12:26Z</dc:date>
    <item>
      <title>Subtotals at a specific row level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4177871#M165961</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to figure out this problem all the morning withouth success...basically I've data as shown in the picture, it's an economic statement...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to insert 2 subtotals in the middle: one after "Costi della Produzione" Total, which should be "Valore della produzione - Costi della produzione" and another before "imposte su reddito dell'esercizio", basically the sum of all bold fields displayed above it. I've tried any kind of trick but nothing... any idea? I'd like it at row level, so they should stay at the same "Macrocategoria" field, and not under them or in a colum....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:51:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4177871#M165961</guid>
      <dc:creator>takui12</dc:creator>
      <dc:date>2024-09-26T11:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotals at a specific row level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4177966#M165980</link>
      <description>&lt;P&gt;You haven't shared any informtion on your model, so that makes it hard to be specific, but the outline of solving is&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add rows for those subtotals to your category dimension&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Alter the measure that calculates the amount for a category&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Add conditional statements (IF or SWITCH)&lt;/LI&gt;
&lt;LI&gt;Test for context where there is one category value, like HASONEVALUE(dim_category[category])&lt;/LI&gt;
&lt;LI&gt;If the category value equals the custom subtotal, calculate the category, replacing the categories *&lt;/LI&gt;
&lt;LI&gt;for other cases calculate the amount as is&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;* CALCULATE(SUM(fact[amount]), ALL(dim_category[category]),&amp;nbsp;dim_category[category] IN ('SERVICI', 'COsti per etc', 'etc'))&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 12:12:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4177966#M165980</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2024-09-26T12:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotals at a specific row level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4178247#M166006</link>
      <description>&lt;P&gt;Hi, thank you for your reply. I'm sorry I thought the picture was enough to think about it...well the model is quite simple, it's just a sum of value from a FinalTable in which I've the amoung for any category involved, so it's a simple aggregation of sum per category. The issue came from the needs to create 2 new lines, as stated above, one which is the sum of the first 2 bold categories in the pic (Valore della produzione and costi della produzione, they are profit and loss of operative income baically), that should stay exactly after Costs of production Total, and another which is the sum of all the bold categories less the last one, which should be put before the last bold one... i'm going round and round trying any kind of code but no success till now&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i've to share something else, lemme know&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for now&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 13:56:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtotals-at-a-specific-row-level/m-p/4178247#M166006</guid>
      <dc:creator>takui12</dc:creator>
      <dc:date>2024-09-26T13:56:54Z</dc:date>
    </item>
  </channel>
</rss>

