<?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: Sum if Sales Rep  Above Goal in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359338#M60221</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can use MROUND to achieve this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT&gt;&lt;FONT&gt;if&lt;/FONT&gt;&lt;FONT&gt;(&lt;/FONT&gt;&lt;FONT&gt; Sales[Gross profit rate]&amp;gt;&lt;/FONT&gt;&lt;FONT&gt;0&lt;/FONT&gt;&lt;FONT&gt;,&lt;/FONT&gt;&lt;FONT&gt; MROUND&lt;/FONT&gt;&lt;FONT&gt;(&lt;/FONT&gt;&lt;FONT&gt;Sales[Gross profit rate],&lt;/FONT&gt;&lt;FONT&gt;0.05&lt;/FONT&gt;&lt;FONT&gt;)&lt;/FONT&gt;&lt;FONT&gt;,&lt;/FONT&gt;&lt;FONT&gt; MROUND&lt;/FONT&gt;&lt;FONT&gt;(&lt;/FONT&gt;&lt;FONT&gt;Sales[Gross profit rate],-&lt;/FONT&gt;&lt;FONT&gt;0.05&lt;/FONT&gt;&lt;FONT&gt;)))&lt;/FONT&gt;&lt;FONT&gt;,&lt;/FONT&gt;&lt;FONT&gt;0&lt;/FONT&gt;&lt;FONT&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT&gt;Thiss will round the measure (in mu example gross profit) to 5% increments. You can use your QTD measure as a base measure and then just compare this QTD measure to a QTD target measure (all within the MROUND)&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank" rel="noopener"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2022 16:56:31 GMT</pubDate>
    <dc:creator>ValtteriN</dc:creator>
    <dc:date>2022-02-24T16:56:31Z</dc:date>
    <item>
      <title>Sum if Sales Rep  Above Goal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359301#M60216</link>
      <description>&lt;P&gt;Hi, I have a ordes table, a table for sales rep goal by quarter and a date table. I would like to group sales reps by percentage of revenue QTD above their goal in 5% increments. How would I write a measure to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT:&amp;nbsp;&lt;/P&gt;&lt;P&gt;The end goal is something like the visualization below. Each of the colored lines represents the total value of for sales reps that land in a 5% increment bucket. For example, red would be sum of all sales reps who's total QTD revenue is between 0%-5% above the goal, orange bewteen 5% to 10%, etc.&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 18:10:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359301#M60216</guid>
      <dc:creator>nbs33</dc:creator>
      <dc:date>2022-02-24T18:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if Sales Rep  Above Goal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359337#M60220</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315872" data-lia-user-login="nbs33" class="lia-mention lia-mention-user"&gt;nbs33&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Measures like (common date table, common sales rep table )&lt;/P&gt;
&lt;P&gt;QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))&lt;/P&gt;
&lt;P&gt;QTD Goal= CALCULATE(SUM(Sales[Goal]),DATESQTD(('Date'[Date])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Achieve % = divide([QTD Sales] -[QTD Goal] ,[QTD Goal])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;countx(filter(values(salesrep[salesrep]), [Achieve %] &amp;gt;.05) , [Salesrep] )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 16:56:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359337#M60220</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-24T16:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if Sales Rep  Above Goal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359338#M60221</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can use MROUND to achieve this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT&gt;&lt;FONT&gt;if&lt;/FONT&gt;&lt;FONT&gt;(&lt;/FONT&gt;&lt;FONT&gt; Sales[Gross profit rate]&amp;gt;&lt;/FONT&gt;&lt;FONT&gt;0&lt;/FONT&gt;&lt;FONT&gt;,&lt;/FONT&gt;&lt;FONT&gt; MROUND&lt;/FONT&gt;&lt;FONT&gt;(&lt;/FONT&gt;&lt;FONT&gt;Sales[Gross profit rate],&lt;/FONT&gt;&lt;FONT&gt;0.05&lt;/FONT&gt;&lt;FONT&gt;)&lt;/FONT&gt;&lt;FONT&gt;,&lt;/FONT&gt;&lt;FONT&gt; MROUND&lt;/FONT&gt;&lt;FONT&gt;(&lt;/FONT&gt;&lt;FONT&gt;Sales[Gross profit rate],-&lt;/FONT&gt;&lt;FONT&gt;0.05&lt;/FONT&gt;&lt;FONT&gt;)))&lt;/FONT&gt;&lt;FONT&gt;,&lt;/FONT&gt;&lt;FONT&gt;0&lt;/FONT&gt;&lt;FONT&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT&gt;Thiss will round the measure (in mu example gross profit) to 5% increments. You can use your QTD measure as a base measure and then just compare this QTD measure to a QTD target measure (all within the MROUND)&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank" rel="noopener"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 16:56:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359338#M60221</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-02-24T16:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if Sales Rep  Above Goal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359432#M60229</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;thanks for the reply.&amp;nbsp; When I try to use your DAX there seems to be syntax error. Is there an additional IF statment needed?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 17:36:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359432#M60229</guid>
      <dc:creator>nbs33</dc:creator>
      <dc:date>2022-02-24T17:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if Sales Rep  Above Goal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359436#M60231</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315872" data-lia-user-login="nbs33" class="lia-mention lia-mention-user"&gt;nbs33&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sorry about that, I used dax from another solution I had. Yes the example requires additional IF.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is modified DAX:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT&gt;if( Sales[Gross profit rate]&amp;gt;0, MROUND(Sales[Gross profit rate],0.05), MROUND(Sales[Gross profit rate],-0.05))&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Feb 2022 17:40:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-if-Sales-Rep-Above-Goal/m-p/2359436#M60231</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-02-24T17:40:02Z</dc:date>
    </item>
  </channel>
</rss>

