<?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: Product Profit in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3725296#M145098</link>
    <description>&lt;P&gt;I tryed sumx using Raw Material, but it did not work.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 23:18:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-26T23:18:13Z</dc:date>
    <item>
      <title>Product Profit</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3721415#M144923</link>
      <description>&lt;P&gt;Hi guys, I need a help to calculate a profit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the table that I have:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So first of all, we are going to calculate the product price:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Cost Price: (Cost + Adjust)*Qtd&lt;/P&gt;&lt;P&gt;RM A: (386 + 24)*0,241 = $ 98,81&lt;/P&gt;&lt;P&gt;RM B: (179 + 22)*0,425 = $ 85,42&lt;/P&gt;&lt;P&gt;RM A: (285 + 19)*0,334 = $ 101,54&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my cost price it is: $ 98,81 + $85,42 + $101,54 = $285,77&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my sales price it is: $ 285,77 + Fee - Descount =&amp;nbsp;$ 285,77 + $ 40 - $ 73,7&amp;nbsp; = $ 252,07&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My profit will be: $ 252,07 -&amp;nbsp;Weighted Cost (USD) = $ 252,07 - $ 264,29 = $ - 12,22 (this value is for each ton)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final value and more important is: $ -12,22 * Volume = $ -12,22*567 = $-6.928,74&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2024 21:44:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3721415#M144923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-24T21:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Product Profit</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3725296#M145098</link>
      <description>&lt;P&gt;I tryed sumx using Raw Material, but it did not work.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 23:18:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3725296#M145098</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-26T23:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Product Profit</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3726189#M145151</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;，&lt;BR /&gt;Based on the data you provided, first I created a calculate column&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cost Price = ('Table'[Cost(USD)]+'Table'[Adjust(USD)])*'Table'[Qtd(%)]&lt;/LI-CODE&gt;
&lt;P&gt;Then create a measure&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Profit =
(
    SUM ( 'Table'[Cost Price] )
        + (
            SELECTEDVALUE ( 'Table'[Fee(USD)] )
                - SELECTEDVALUE ( 'Table'[Product Discount(USD)] )
        )
        - SUM ( 'Table'[Weighted Cost(USD)] )
)
    * SUM ( 'Table'[Volume(ton)] )
&lt;/LI-CODE&gt;
&lt;P&gt;Change the format of measure&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Albert He&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 06:06:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Product-Profit/m-p/3726189#M145151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-27T06:06:32Z</dc:date>
    </item>
  </channel>
</rss>

