<?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: Many to many relationship calculation for groups of products in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288261#M122335</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="576646" data-lia-user-login="Lukas96" class="lia-mention lia-mention-user"&gt;Lukas96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to smend [Price] as follows&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Price =&lt;BR /&gt;SUMX ( Sales, DIVIDE ( Sales[Revenue], Sales[Qty] ) )&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jun 2023 16:21:20 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-06-16T16:21:20Z</dc:date>
    <item>
      <title>Many to many relationship calculation for groups of products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288047#M122310</link>
      <description>&lt;P class=""&gt;Hello guys,&lt;/P&gt;&lt;P class=""&gt;I have this problem. I would like to calculate the bundle price and this is my model.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Sales table:&lt;/P&gt;&lt;P&gt;Product name Price&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Main Device A&lt;/TD&gt;&lt;TD&gt;10000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Component 1&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Component 2&lt;/TD&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Main Device B&lt;/TD&gt;&lt;TD&gt;15000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Component 3&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;and I have another table with Bundles which has Many to Many relationship with the table above on Product name = Product name&lt;/P&gt;&lt;P&gt;Parts Product name Bundle Name&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Part 1&lt;/TD&gt;&lt;TD&gt;Main Device A&lt;/TD&gt;&lt;TD&gt;Bundle A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Part 2&lt;/TD&gt;&lt;TD&gt;Component 1&lt;/TD&gt;&lt;TD&gt;Bundle A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Part 3&lt;/TD&gt;&lt;TD&gt;Component 2&lt;/TD&gt;&lt;TD&gt;Bundle A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Part 1&lt;/TD&gt;&lt;TD&gt;Main Device B&lt;/TD&gt;&lt;TD&gt;Bundle B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Part 2&lt;/TD&gt;&lt;TD&gt;Component 1&lt;/TD&gt;&lt;TD&gt;Bundle B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Part 3&lt;/TD&gt;&lt;TD&gt;Component 1&lt;/TD&gt;&lt;TD&gt;Bundle B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Part 4&lt;/TD&gt;&lt;TD&gt;Component 3&lt;/TD&gt;&lt;TD&gt;Bundle B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;What I want to achieve is to have a Price per Bundle Name. For example Bundle A price is the sum of each components: (Main Device A, Component 1, Component 2) 10000 + 500 + 600 = 11100&lt;BR /&gt;for Bundle B it is (Main Device B, Component 1 x2, Component 3) 15000 + 500 + 500 + 1000 = 17 000&lt;/P&gt;&lt;P class=""&gt;I am a bit lost on what should be a DAX code for the price?&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 14:21:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288047#M122310</guid>
      <dc:creator>Lukas96</dc:creator>
      <dc:date>2023-06-16T14:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Many to many relationship calculation for groups of products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288166#M122318</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="576646" data-lia-user-login="Lukas96" class="lia-mention lia-mention-user"&gt;Lukas96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have tried simple SUM ( Sales[Price] )&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 15:05:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288166#M122318</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-16T15:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Many to many relationship calculation for groups of products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288205#M122328</link>
      <description>&lt;P&gt;This is simplified, I have a Price as a measure, what I have in the table sales is Revenue and Qty + I have Customers. Price is then a measure = Divide(Sum(revenue), Sum(Qty)).&amp;nbsp;&lt;BR /&gt;The measure itself is not working for Bundles because for Bundle A for example I dont want to aggregate all the componets within Bundle A. If I aggregate it the Price for Bundle A will be 2 900. But the correct price should be the sum of individual components prices (10 000 +500 + 600 = 11 000)&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Revenue&lt;/TD&gt;&lt;TD&gt;Units&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Main Device A&lt;/TD&gt;&lt;TD&gt;100 000&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Component 1&lt;/TD&gt;&lt;TD&gt;10 000&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Component 2&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5 000&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;..&lt;/TD&gt;&lt;TD&gt;..&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Jun 2023 15:41:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288205#M122328</guid>
      <dc:creator>Lukas96</dc:creator>
      <dc:date>2023-06-16T15:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Many to many relationship calculation for groups of products</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288261#M122335</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="576646" data-lia-user-login="Lukas96" class="lia-mention lia-mention-user"&gt;Lukas96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to smend [Price] as follows&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Price =&lt;BR /&gt;SUMX ( Sales, DIVIDE ( Sales[Revenue], Sales[Qty] ) )&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 16:21:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Many-to-many-relationship-calculation-for-groups-of-products/m-p/3288261#M122335</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-16T16:21:20Z</dc:date>
    </item>
  </channel>
</rss>

