<?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: Opposite of sum function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169621#M18002</link>
    <description>&lt;P&gt;This post should help you get there;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculated-column-show-subtotal-of-filter-against-every-row/m-p/1144102#M17181" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculated-column-show-subtotal-of-filter-against-every-row/m-p/1144102#M17181&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 18:09:58 GMT</pubDate>
    <dc:creator>stevedep</dc:creator>
    <dc:date>2020-06-18T18:09:58Z</dc:date>
    <item>
      <title>Opposite of sum function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169489#M17998</link>
      <description>&lt;P&gt;So there's the SUM function as a measure or explicit measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A, 10&lt;/P&gt;&lt;P&gt;A, 20&lt;/P&gt;&lt;P&gt;B, 15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Returns this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A, 30&lt;/P&gt;&lt;P&gt;B, 15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now let's say a faulty table already summed the values, but the amount of rows is equal to the amount of rows before the sum. Like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A, 30&lt;/P&gt;&lt;P&gt;A, 30&lt;/P&gt;&lt;P&gt;B, 15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create the opposite measure of SUM that divides the value by the count it occurs per group (A/B in this example), resulting in this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A, 15&lt;/P&gt;&lt;P&gt;A, 15&lt;/P&gt;&lt;P&gt;B, 15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the end result is more like a prediction than true to reality, but that's okay.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:20:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169489#M17998</guid>
      <dc:creator>richard-powerbi</dc:creator>
      <dc:date>2020-06-18T17:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite of sum function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169519#M18000</link>
      <description>&lt;P&gt;Don't use DAX to fix a mistake that was made in a previous step. Prevent that mistake in your process.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:27:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169519#M18000</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-18T17:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite of sum function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169621#M18002</link>
      <description>&lt;P&gt;This post should help you get there;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculated-column-show-subtotal-of-filter-against-every-row/m-p/1144102#M17181" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculated-column-show-subtotal-of-filter-against-every-row/m-p/1144102#M17181&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 18:09:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169621#M18002</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-18T18:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite of sum function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169664#M18004</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;I wouldn't be asking this if I could fix it in a previous proces...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;thanks but I don't see how this could help me...&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 18:25:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169664#M18004</guid>
      <dc:creator>richard-powerbi</dc:creator>
      <dc:date>2020-06-18T18:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite of sum function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169992#M18014</link>
      <description>&lt;P&gt;Here is an expressiont that works with your sample data.&amp;nbsp; I called the table 'Reverse'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Reverse Sum =
VAR __thisletter =
    MIN ( Reverse[Letter] )
VAR __count =
    CALCULATE (
        COUNTROWS ( Reverse ),
        ALL ( Reverse ),
        Reverse[Letter] = __thisletter
    )
VAR __thisaverage =
    AVERAGE ( Reverse[Number] )
RETURN
    DIVIDE ( __thisaverage, __count )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 22:28:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1169992#M18014</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-06-18T22:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite of sum function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1170846#M18037</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="84144" data-lia-user-login="richard-powerbi" class="lia-mention lia-mention-user"&gt;richard-powerbi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count the number of rows for each id and divide it by the total.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create a Calculated Column&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rows_id =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var a = CALCULATE(COUNT('Table'[Column1]),ALLEXCEPT('Table','Table'[Column1]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE('Table'[Column2],a)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 07:53:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Opposite-of-sum-function/m-p/1170846#M18037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-19T07:53:51Z</dc:date>
    </item>
  </channel>
</rss>

