<?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: Ratio of two sums in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2845899#M91068</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , You can have a new column &lt;/P&gt;
&lt;P&gt;New column in SO&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sumx(filter( Fulfillments , Fulfillments [So] = SalesOrder[SO]), Fulfillments [Qty])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer 4 ways to copy data from one table to another&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=Wu1mWxR23jU" target="_blank"&gt;https://www.youtube.com/watch?v=Wu1mWxR23jU&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=czNHt7UXIe8" target="_blank"&gt;https://www.youtube.com/watch?v=czNHt7UXIe8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this does not help&lt;BR /&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 08:29:04 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-10-17T08:29:04Z</dc:date>
    <item>
      <title>Ratio of two sums</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2845843#M91066</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to calcualte the ratio between two sums. My dataset is built as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a table with all the Inventory Fulfillments (associated to Sales Orders, there can be more than one IF for each SO), to each IF is associated a shipping cost;&lt;/LI&gt;&lt;LI&gt;a table with all Sales Orders, each line of the table contains an item in the sales order and the relative amount (€) ordered, it's possible to obtain the total ordered value of the SO by summing all the lines of the table, grouping by SO;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I need to calculate, for each SO, the ratio between the shipping cost and the total value of the order, but I'm having trouble doing so.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me? I can share my initial solution nut it doesn't work at all.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:08:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2845843#M91066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-17T08:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Ratio of two sums</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2845899#M91068</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , You can have a new column &lt;/P&gt;
&lt;P&gt;New column in SO&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sumx(filter( Fulfillments , Fulfillments [So] = SalesOrder[SO]), Fulfillments [Qty])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer 4 ways to copy data from one table to another&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=Wu1mWxR23jU" target="_blank"&gt;https://www.youtube.com/watch?v=Wu1mWxR23jU&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=czNHt7UXIe8" target="_blank"&gt;https://www.youtube.com/watch?v=czNHt7UXIe8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this does not help&lt;BR /&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:29:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2845899#M91068</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-17T08:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Ratio of two sums</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2848708#M91224</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I create a sample to have a test.&lt;/P&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;DimSo:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DimSO = VALUES(Table2[Sales Orders])&lt;/LI-CODE&gt;
&lt;P&gt;Relationship:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rate = 
VAR _RelativeAmount = CALCULATE(SUM(Table2[Relative Amount]))
VAR _ShippingCost = CALCULATE(SUM(Table1[Shipping Cost]))
RETURN
DIVIDE(_RelativeAmount - _ShippingCost,_ShippingCost)&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 09:35:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ratio-of-two-sums/m-p/2848708#M91224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-18T09:35:14Z</dc:date>
    </item>
  </channel>
</rss>

