<?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: Tiered Measure for Rebate Calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Tiered-Measure-for-Rebate-Calculation/m-p/4000986#M155908</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="752973" data-lia-user-login="jeck12" class="lia-mention lia-mention-user"&gt;jeck12&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My assumption is that the stratification is based on the value of Revenue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a simple program I offer that you can reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The point is that after determining the Rebate Methodology, a hierarchical calculation is performed based on Revenue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _RebateMethodology = SELECTEDVALUE('Table'[Rebate Methodology])
VAR _Revenue = SELECTEDVALUE('Table'[Revenue])
RETURN
SWITCH(
    _RebateMethodology,
    "S", _Revenue * 0.5,
    "T", 
    IF(
        _Revenue &amp;lt; 4000000,
        _Revenue * 0.1,
        IF(
            _Revenue &amp;gt;= 4000000 &amp;amp;&amp;amp; _Revenue &amp;lt; 40000000,
            _Revenue * 0.2,
            _Revenue * 0.3        
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&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;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 07:07:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-06-25T07:07:51Z</dc:date>
    <item>
      <title>Tiered Measure for Rebate Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Tiered-Measure-for-Rebate-Calculation/m-p/4000334#M155818</link>
      <description>&lt;P&gt;I'm developing a report that pulls together revenue data and then calculates the rebate amount, based on specific parameters, which is different for each individual customer. There are simple calculations, which are just straight %'s of revenue, but there are also tiered scenarios.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the data that I'm looking at currently. What I've got so far is a flag in the Rebate Methodology column that's "S" if it's a simple calculation, which can just be revenue*rebate%. If the flag is "T", then it's a tiered rebate. How would I go about writing a DAX Measure that accomplishes calculating the Rebate amount, performing the simple calculation above if the flag is "S", but calculating based on tiers if the flag is "T"? Based on the different tiers for each of these different customers. The tiers are different for each customer, they aren't the same across the board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Customer Name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Revenue&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Rebate Methodology&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Percent&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;General Rebate / GPO terms&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1000000&lt;/TD&gt;&lt;TD&gt;S&lt;/TD&gt;&lt;TD&gt;45.00%&lt;/TD&gt;&lt;TD&gt;Proceeds and Customer owned&amp;nbsp; inventory sales 97.5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;4000000&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;Tiered from 1% to 3.5%&lt;/TD&gt;&lt;TD&gt;1% first $1.5M, 1.5% next $0.5M, 2% next $0.5M, 2.5% next $0.5M, 3% next $0.5M, 3.5% excess over $3.5M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;4000000&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;Tiered from 1% to 3.5%&lt;/TD&gt;&lt;TD&gt;1% first $1.5M, 1.5% next $0.5M, 2% next $0.5M, 2.5% next $0.5M, 3% next $0.5M, 3.5% excess over $3.5M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;1000000&lt;/TD&gt;&lt;TD&gt;S&lt;/TD&gt;&lt;TD&gt;1.00%&lt;/TD&gt;&lt;TD&gt;No current rebate program, holding a 2020 and 2021 rebate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;40000000&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;Tiered from 2% to 6%&lt;/TD&gt;&lt;TD&gt;2% volume rebate on $20M or less, 3.5% on $20 to $25M, 4.5% on $25 to $30M, 5.5% on $30 to $35M, 6% greater than $35M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;40000000&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;Tiered from 2% to 6%&lt;/TD&gt;&lt;TD&gt;2% volume rebate on $20M or less, 3.5% on $20 to $25M, 4.5% on $25 to $30M, 5.5% on $30 to $35M, 6% greater than $35M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;TD&gt;2000000&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;Tiered from 1% to 3%&lt;/TD&gt;&lt;TD&gt;Rebate paid after attaining $650,000 in sales. 1.0% volume rebate on $650K to $800K, 2.0% on $800K to $1M, 3.0% on $1M and above&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 19 Jun 2024 14:28:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Tiered-Measure-for-Rebate-Calculation/m-p/4000334#M155818</guid>
      <dc:creator>jeck12</dc:creator>
      <dc:date>2024-06-19T14:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Tiered Measure for Rebate Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Tiered-Measure-for-Rebate-Calculation/m-p/4000986#M155908</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="752973" data-lia-user-login="jeck12" class="lia-mention lia-mention-user"&gt;jeck12&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My assumption is that the stratification is based on the value of Revenue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a simple program I offer that you can reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The point is that after determining the Rebate Methodology, a hierarchical calculation is performed based on Revenue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _RebateMethodology = SELECTEDVALUE('Table'[Rebate Methodology])
VAR _Revenue = SELECTEDVALUE('Table'[Revenue])
RETURN
SWITCH(
    _RebateMethodology,
    "S", _Revenue * 0.5,
    "T", 
    IF(
        _Revenue &amp;lt; 4000000,
        _Revenue * 0.1,
        IF(
            _Revenue &amp;gt;= 4000000 &amp;amp;&amp;amp; _Revenue &amp;lt; 40000000,
            _Revenue * 0.2,
            _Revenue * 0.3        
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&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;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 07:07:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Tiered-Measure-for-Rebate-Calculation/m-p/4000986#M155908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-25T07:07:51Z</dc:date>
    </item>
  </channel>
</rss>

