<?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: Maximize sum of (n-combination) rows with constraint in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2680872#M80283</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421073" data-lia-user-login="stats" class="lia-mention lia-mention-user"&gt;stats&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, actually it'll not be 1000^3 combinations but only&amp;nbsp;166 167 000 (1000 over 3). Well, this is something PQ can definitely handle without a problem! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 08:02:19 GMT</pubDate>
    <dc:creator>daXtreme</dc:creator>
    <dc:date>2022-08-04T08:02:19Z</dc:date>
    <item>
      <title>Maximize sum of (n-combination) rows with constraint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2679338#M80177</link>
      <description>&lt;P&gt;I have a table with 3 columns: Product, Cost, Revenue.&lt;/P&gt;&lt;P&gt;There are 1000 rows (1000 distinct Products).&lt;/P&gt;&lt;P&gt;My budget equals B.&lt;/P&gt;&lt;P&gt;I want to filter 3 Products so that I maximize the Revenue sum for those 3 products, provided that the total Cost for those 3 Products are less than my budget B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be done in Power BI?&lt;/P&gt;&lt;P&gt;I would appreciate any kind of help.&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;Best Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 16:46:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2679338#M80177</guid>
      <dc:creator>stats</dc:creator>
      <dc:date>2022-08-03T16:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Maximize sum of (n-combination) rows with constraint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2680691#M80272</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421073" data-lia-user-login="stats" class="lia-mention lia-mention-user"&gt;stats&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Such tasks are not suitable for effective DAX calculations (DAX is not a language for optimization problems). What you can do is this. Create a table where you'll have combinations of all 3 products. For each combination you should store their total cost and their total revenue as well Yes, I know, it'll be 1000^3 rows but PBI should be able to handle this, especially that there'll be a lot of repetition in each column (so the compression rate should be high). You can at least try... If you have such a table, it should then be easy to find the combination of interest.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 06:52:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2680691#M80272</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-04T06:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Maximize sum of (n-combination) rows with constraint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2680872#M80283</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421073" data-lia-user-login="stats" class="lia-mention lia-mention-user"&gt;stats&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, actually it'll not be 1000^3 combinations but only&amp;nbsp;166 167 000 (1000 over 3). Well, this is something PQ can definitely handle without a problem! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 08:02:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Maximize-sum-of-n-combination-rows-with-constraint/m-p/2680872#M80283</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-04T08:02:19Z</dc:date>
    </item>
  </channel>
</rss>

