<?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 sum divided by count in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/927172#M9437</link>
    <description>&lt;P&gt;Hello I have a problem with a Dax calc.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to divide the sum of Metingtest 2 by count Metingtest. That results in Metingtest3. And that result is correct.&lt;/P&gt;&lt;P&gt;However in the bottom , you see 52488 .That is the result of the total divided by total count. (264382263/5037)&lt;/P&gt;&lt;P&gt;But I need to have the sum of Metingtest3 (so all results of that column summed up)&lt;/P&gt;&lt;P&gt;How can I accomplish that?&lt;/P&gt;&lt;P&gt;So calculation of Metingtest3 = sum(budgetrow)/Count(budgetrow)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully I am explaning myself in a good way... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2020 14:53:33 GMT</pubDate>
    <dc:creator>Arendp</dc:creator>
    <dc:date>2020-02-10T14:53:33Z</dc:date>
    <item>
      <title>sum divided by count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/927172#M9437</link>
      <description>&lt;P&gt;Hello I have a problem with a Dax calc.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to divide the sum of Metingtest 2 by count Metingtest. That results in Metingtest3. And that result is correct.&lt;/P&gt;&lt;P&gt;However in the bottom , you see 52488 .That is the result of the total divided by total count. (264382263/5037)&lt;/P&gt;&lt;P&gt;But I need to have the sum of Metingtest3 (so all results of that column summed up)&lt;/P&gt;&lt;P&gt;How can I accomplish that?&lt;/P&gt;&lt;P&gt;So calculation of Metingtest3 = sum(budgetrow)/Count(budgetrow)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully I am explaning myself in a good way... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 14:53:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/927172#M9437</guid>
      <dc:creator>Arendp</dc:creator>
      <dc:date>2020-02-10T14:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: sum divided by count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/927490#M9451</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="180942" data-lia-user-login="Arendp" class="lia-mention lia-mention-user"&gt;Arendp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it needs to be something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;AvgRowAndTotal = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// My Dummy MetingTest3Berekening = Divide(sumx ( sales, Sales[Quantity] * Sales[Net Price]),sum(Sales[Quantity]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Var RowOrTotal = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF ( ISFILTERED('Product'[Category]),     -- replace Product[Category] with your own fields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Divide(sumx ( sales, Sales[Quantity] * Sales[Net Price]),sum(Sales[Quantity])), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUMX(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Summarize (                 -- create temporary table with the same subtotals&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Sales,                     -- you can check them in DAX studio&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Product'[Category], &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"rowtotal", Divide(sumx ( sales, Sales[Quantity] * Sales[Net Price]),sum(Sales[Quantity]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;, [rowtotal])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;return RowOrTotal&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Feb 2020 19:10:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/927490#M9451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-10T19:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: sum divided by count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/928226#M9466</link>
      <description>&lt;P&gt;That helped, thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 10:06:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/928226#M9466</guid>
      <dc:creator>Arendp</dc:creator>
      <dc:date>2020-02-11T10:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: sum divided by count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/928230#M9467</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are they columns or measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For column you have hasonevalue function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are more threads for total is wrong on community you can check those.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 10:09:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-divided-by-count/m-p/928230#M9467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-11T10:09:38Z</dc:date>
    </item>
  </channel>
</rss>

