<?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: Distribute subtotal of specific type on other rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317470#M57777</link>
    <description>&lt;P&gt;Well, yes maybe i explained it a little bit confusive. Basically my problem is that for ANY BRAND&amp;amp;ITEM Combination i have a Storage Cost of "X". Now i need a way to dynamically store this Storage amount per BRAND&amp;lt;=&amp;gt;ITEM COMBO and multiply this amount in the corresponding rows times a spread which i already have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So f.e. for&lt;/P&gt;&lt;P&gt;BRAND A ITEM 1 i would have Cost 100&lt;/P&gt;&lt;P&gt;BRAND B ITEM 2 i would have Cost 200&lt;/P&gt;&lt;P&gt;BRAND C ITEM 3 i would have Cost 300&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would want ONE SINGLE VARIABLE "STORAGECOST" which i am multiplying with the [Spread%] in any given row but while "STORAGECOST" will dynamically differ based on the row (and BRAND|ITEM) i am currently in. See example below ==&amp;gt; basically there are 2 sections (1 where i get the corresponding storage cost and 2 where i distribute this corresponding storage cost based on the spread of the particular row)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BRAND&lt;/TD&gt;&lt;TD&gt;ITEM&lt;/TD&gt;&lt;TD&gt;SPREAD&lt;/TD&gt;&lt;TD&gt;COST&lt;/TD&gt;&lt;TD&gt;CALC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;100*10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;100*90%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;322&lt;/TD&gt;&lt;TD&gt;200*80%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;200*20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;44&lt;/TD&gt;&lt;TD&gt;300*100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Thu, 03 Feb 2022 10:39:23 GMT</pubDate>
    <dc:creator>padinator</dc:creator>
    <dc:date>2022-02-03T10:39:23Z</dc:date>
    <item>
      <title>Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317370#M57770</link>
      <description>&lt;P&gt;Hello, i am quite new to DAX Commands and PowerPivot but i am trying to achieve the following and am quite sure that this should be possible quite easy.&lt;/P&gt;&lt;P&gt;At the moment i have a classical pivot table of multiple levels which has the following hierarchy&lt;/P&gt;&lt;P&gt;BRAND =&amp;gt; ITEM =&amp;gt; COST DIMENSION&lt;/P&gt;&lt;P&gt;What i want to achieve is to dynamically calculate a Subtotal of any existing BRAND&amp;lt;=&amp;gt;ITEM combination which i am then using as a multiplier in order to distribute this subtotal on any existing row based on their particular percentage share.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the table below i would need a measure which saves the Cost for Type = Storage and then distributes this amount on the corresponding rows above based on their percentage share.&lt;/P&gt;&lt;P&gt;This has to be done also for the following brand&amp;lt;=&amp;gt;item combinations as this is just illustrating the first group of many.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope i made myself clear. If not, please feel free to ask! Thanks a lot!&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BRAND&lt;/TD&gt;&lt;TD&gt;ITEM&lt;/TD&gt;&lt;TD&gt;COST DIM&lt;/TD&gt;&lt;TD&gt;COST TYPE&lt;/TD&gt;&lt;TD&gt;COST AMOUNT&lt;/TD&gt;&lt;TD&gt;COST %&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;011&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;XX&lt;/TD&gt;&lt;TD&gt;GENERAL&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;011&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;XY&lt;/TD&gt;&lt;TD&gt;GENERAL&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;011&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;YY&lt;/TD&gt;&lt;TD&gt;GENERAL&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;011&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;TD&gt;STORAGE&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 09:54:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317370#M57770</guid>
      <dc:creator>padinator</dc:creator>
      <dc:date>2022-02-03T09:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317395#M57772</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="332430" data-lia-user-login="padinator" class="lia-mention lia-mention-user"&gt;padinator&lt;/a&gt; , You can get sub total like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sub Total =&lt;/P&gt;
&lt;P&gt;calculate(sum(Table[COST AMOUNT]), filter(allselected(Table), Table[Brand] = max(Table[Brand]) &amp;amp;&amp;amp; Table[ITEM ] = max(Table[ITEM ])&amp;nbsp; ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did not get the % logic&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but % of subtotal is&lt;/P&gt;
&lt;P&gt;divide(sum(Table[COST AMOUNT]), [Sub Total])&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 10:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317395#M57772</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-03T10:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317454#M57775</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wasn't able to fully able to figure out your Brand/Item/Cost Dimension but my understanding is that this is a subtotal and apportion job.&amp;nbsp; My take below is a more general approach using a table I've built myself with just two levels for Brand and Product.&amp;nbsp; I've put in random values for Cost and I've made sure that the apportionment value Spread % adds up to 100% for each Brand/Product combination&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a basic Excel table the column "Goal" is achieved using a SUMIFS formula that adds the column based on the value of the row in that column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUMIFS([Cost], [Brand], [@Brand], [Product], [@Product])*[@[Spread %]]&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;In DAX, I achieved this in a calculated column using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR _OuterBrand=Table1[Brand]
VAR _OuterProduct=Table1[Product]
VAR _Calc = SUMX(FILTER(Table1, Table1[Brand]=_OuterBrand &amp;amp;&amp;amp; Table1[Product]=_OuterProduct), Table1[Cost])
RETURN _Calc * Table1[Spread %]&lt;/LI-CODE&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;I know this isn't exactly your data, which has three levels, but I hope it helps you get to the answer for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 10:29:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317454#M57775</guid>
      <dc:creator>Richard_100</dc:creator>
      <dc:date>2022-02-03T10:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317470#M57777</link>
      <description>&lt;P&gt;Well, yes maybe i explained it a little bit confusive. Basically my problem is that for ANY BRAND&amp;amp;ITEM Combination i have a Storage Cost of "X". Now i need a way to dynamically store this Storage amount per BRAND&amp;lt;=&amp;gt;ITEM COMBO and multiply this amount in the corresponding rows times a spread which i already have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So f.e. for&lt;/P&gt;&lt;P&gt;BRAND A ITEM 1 i would have Cost 100&lt;/P&gt;&lt;P&gt;BRAND B ITEM 2 i would have Cost 200&lt;/P&gt;&lt;P&gt;BRAND C ITEM 3 i would have Cost 300&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would want ONE SINGLE VARIABLE "STORAGECOST" which i am multiplying with the [Spread%] in any given row but while "STORAGECOST" will dynamically differ based on the row (and BRAND|ITEM) i am currently in. See example below ==&amp;gt; basically there are 2 sections (1 where i get the corresponding storage cost and 2 where i distribute this corresponding storage cost based on the spread of the particular row)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BRAND&lt;/TD&gt;&lt;TD&gt;ITEM&lt;/TD&gt;&lt;TD&gt;SPREAD&lt;/TD&gt;&lt;TD&gt;COST&lt;/TD&gt;&lt;TD&gt;CALC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;100*10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;100*90%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;322&lt;/TD&gt;&lt;TD&gt;200*80%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;200*20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;44&lt;/TD&gt;&lt;TD&gt;300*100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 10:39:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317470#M57777</guid>
      <dc:creator>padinator</dc:creator>
      <dc:date>2022-02-03T10:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317496#M57778</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe that's what my formula does; it calculates the subtotal of a cost column for a brand/product combination and multiplies it by a spread % column.&amp;nbsp; It does both steps within the same formula: in the RETURN block it has _Calc * Spread % where _Calc is that subtotal and the spread is taken from the line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry if I've misunderstood; it may be easier for myself and others if you create and share a PBIX file that has all the columns and data to work with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 11:00:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317496#M57778</guid>
      <dc:creator>Richard_100</dc:creator>
      <dc:date>2022-02-03T11:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317604#M57787</link>
      <description>&lt;P&gt;Well, this works but goes to disatvantage of performance unfortunately. In this way i do calculate the total Cost Amount in any single line while i would normally just need to calculate the total amount once per Item&amp;lt;=&amp;gt;Brand combination. So working yes, but not really practicable unfortunately. Is there not another solution where i can, as i suggested, calculate the sum per Combination one time and then use it dynamically at the corresponding places?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 11:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2317604#M57787</guid>
      <dc:creator>padinator</dc:creator>
      <dc:date>2022-02-03T11:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2318059#M57828</link>
      <description>&lt;P&gt;If you have a Brand/Product table separately (one line per combination, with a unqiue identifier column that has a relationship to the same column in the main fact table), you could put a calculated column there.&amp;nbsp; It would either be a slightly adapted version of what I had, or something like SUMX( RELATEDTABLE('Table1', [Cost]) ).&amp;nbsp; And then it would sit there, ready to be used.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your main table, which would have a relationship to this other table via the unique identifier, you could have a calculated column that would be along the lines of RELATED('ProductBrandTable'[Cost]) * [Spread %] ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your case, you have more than two things that define it as unique (Brand + Item + Cost Dimension, at least) but you could construct one specially, either with Power Query as a new query that summarises your main fact table or as a DAX defined table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For defining the table with DAX, I think this would do it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUMMARIZE(Table1, [Brand],[Product]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"@Cost", CALCULATE(SUM(Table1[Cost]))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I don't know how to make this into a table which can be constructed once and linked to the data model, to be accessed using a RELATED([@Cost]) type method as described above&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope all the above is of some help.&amp;nbsp; It is more just me thinking out loud rather than a targeted solution for you.&amp;nbsp; It felt a bit circular to have a table that summarises the main table and is then referenced by that main table again, so I don't know how performant it would be.&amp;nbsp; I think you need one of the big guns on the board to swoop in and help you out to optimise further&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 16:09:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2318059#M57828</guid>
      <dc:creator>Richard_100</dc:creator>
      <dc:date>2022-02-03T16:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute subtotal of specific type on other rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2318269#M57839</link>
      <description>&lt;P&gt;Just to follow on, because I was curious, I have created my potential solution in a PBIX file which I don't know how to attach but hopefully there are enough screenshots here to help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the modelling features, I made a new table with this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUMMARIZE('Table', 'Table'[Brand],'Table'[Product]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"@Cost", CALCULATE(SUM('Table'[Cost]))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a unique identifier field in my main 'Table' and also added to the above, basically [Brand] &amp;amp; [ Product] in both.&amp;nbsp; I created a relationship from 'Table 2' to 'Table' on this identifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;I then added a new calculated column in the original table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table 2'[@Cost]&lt;/SPAN&gt;&lt;SPAN&gt;) * &lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Spread %]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This returns the answer within this dummy dataset.&amp;nbsp; I have no idea about performance though.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Richard&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Feb 2022 18:08:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-subtotal-of-specific-type-on-other-rows/m-p/2318269#M57839</guid>
      <dc:creator>Richard_100</dc:creator>
      <dc:date>2022-02-03T18:08:08Z</dc:date>
    </item>
  </channel>
</rss>

