<?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 Calcucate Commission from a Range Table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4567019#M175650</link>
    <description>&lt;P&gt;Need help to add a calculated column for sales commission in each row of the Sales table. The commission % is determined by the total YTD revenue for the sales person for which the lookup range is in Target table.&amp;nbsp;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Example - For Person1&lt;BR /&gt;18-Dec-2024&amp;nbsp; - YTD invoice is 500, so commission&amp;nbsp;@ 5%&lt;BR /&gt;13-Jan-2025 - YTD invoice is 2000 (Dec - 500+Jan - 1500), first 500 already paid in Dec, remaining 500&amp;nbsp;@5% and 1000&amp;nbsp;@ 6%.&lt;BR /&gt;24-Feb-2025 - YTD invoice is 4000 (Dec 500 + Jan - 1500 + Feb 2000) first 2000 already paid, remaining 1500&amp;nbsp;@ 6% and 500&amp;nbsp;@ 7%&lt;BR /&gt;&lt;STRONG&gt;Total = 235&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2025 05:04:19 GMT</pubDate>
    <dc:creator>Kosh</dc:creator>
    <dc:date>2025-02-26T05:04:19Z</dc:date>
    <item>
      <title>Calcucate Commission from a Range Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4567019#M175650</link>
      <description>&lt;P&gt;Need help to add a calculated column for sales commission in each row of the Sales table. The commission % is determined by the total YTD revenue for the sales person for which the lookup range is in Target table.&amp;nbsp;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Example - For Person1&lt;BR /&gt;18-Dec-2024&amp;nbsp; - YTD invoice is 500, so commission&amp;nbsp;@ 5%&lt;BR /&gt;13-Jan-2025 - YTD invoice is 2000 (Dec - 500+Jan - 1500), first 500 already paid in Dec, remaining 500&amp;nbsp;@5% and 1000&amp;nbsp;@ 6%.&lt;BR /&gt;24-Feb-2025 - YTD invoice is 4000 (Dec 500 + Jan - 1500 + Feb 2000) first 2000 already paid, remaining 1500&amp;nbsp;@ 6% and 500&amp;nbsp;@ 7%&lt;BR /&gt;&lt;STRONG&gt;Total = 235&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 05:04:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4567019#M175650</guid>
      <dc:creator>Kosh</dc:creator>
      <dc:date>2025-02-26T05:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calcucate Commission from a Range Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4567757#M175652</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="594698" data-lia-user-login="Kosh" class="lia-mention lia-mention-user"&gt;Kosh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, create a calculated column in the Sales table to calculate the Year-To-Date (YTD) revenue for each sales person.&lt;BR /&gt;YTD Revenue = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM(Sales[Invoice Amount]),&lt;BR /&gt;FILTER(&lt;BR /&gt;Sales,&lt;BR /&gt;Sales[Sales Person] = EARLIER(Sales[Sales Person]) &amp;amp;&amp;amp;&lt;BR /&gt;Sales[Invoice Date] &amp;lt;= EARLIER(Sales[Invoice Date])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;Next, create a calculated column to determine the commission rate based on the YTD revenue and the Target table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Commission Rate &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CurrentYTD &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; Sales[YTD Revenue]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Target&lt;/SPAN&gt;&lt;SPAN&gt;[Commission %]),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Target&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Target&lt;/SPAN&gt;&lt;SPAN&gt;[Sales Person] &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; Sales[Sales Person] &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CurrentYTD &lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Target&lt;/SPAN&gt;&lt;SPAN&gt;[Min] &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CurrentYTD &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN&gt;Target&lt;/SPAN&gt;&lt;SPAN&gt;[Max]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a Calculated Column for Commission Amount: Finally, create a calculated column to calculate the commission amount for each row.&lt;BR /&gt;Commission Amount = &lt;BR /&gt;Sales[Invoice Amount] * Sales[Commission Rate]&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Combine the Results: You can now combine these columns to get the total commission for each sales person.&lt;BR /&gt;Total Commission = &lt;BR /&gt;SUMX(&lt;BR /&gt;Sales,&lt;BR /&gt;Sales[Commission Amount]&lt;BR /&gt;)&lt;BR /&gt;By following these steps, you will be able to calculate the commission for each row in the Sales table based on the YTD&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 10:10:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4567757#M175652</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-25T10:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calcucate Commission from a Range Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4570593#M175657</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="594698" data-lia-user-login="Kosh" class="lia-mention lia-mention-user"&gt;Kosh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;why the last 500 (24 Feb 2025) is 7%.. It should be 5% based on your range table and commision amount should be 25.&lt;BR /&gt;if it is not.then how do you calculate this 7% for 500?&lt;BR /&gt;Please clarify this.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;sanalytics&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 12:04:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calcucate-Commission-from-a-Range-Table/m-p/4570593#M175657</guid>
      <dc:creator>sanalytics</dc:creator>
      <dc:date>2025-02-25T12:04:28Z</dc:date>
    </item>
  </channel>
</rss>

