<?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 of measure (average) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1926927#M41798</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like the one I'm pasting below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have to main columns I'm using qty (vtas pza) and cost&lt;/P&gt;&lt;P&gt;The issue i'm having is this&lt;/P&gt;&lt;P&gt;I created the following measures&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1PROMVENTAS = AVERAGE(VENTAS[Vta Pzas])&amp;nbsp; - this is the average of units sold&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2COSTOTOTAL = AVERAGE(VENTAS[COSTOPROM]) - this is the price&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VTACTOTOTAL = AVERAGEX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&amp;nbsp;it want it to sum 304.37 from the 5th column,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For some reason it does not adds the results of the ids in the table if I do this for the sums instead of average it works, what am I doing wrong.&amp;nbsp; The following is the case that&amp;nbsp; works but I need averages of units and costs and then sum of totals.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VTACTOTOTAL = AVERAGEX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VTACTOTOTAL = sumX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please advise&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 29 Jun 2021 02:14:30 GMT</pubDate>
    <dc:creator>ooctaviano</dc:creator>
    <dc:date>2021-06-29T02:14:30Z</dc:date>
    <item>
      <title>sum of measure (average)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1926927#M41798</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like the one I'm pasting below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have to main columns I'm using qty (vtas pza) and cost&lt;/P&gt;&lt;P&gt;The issue i'm having is this&lt;/P&gt;&lt;P&gt;I created the following measures&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1PROMVENTAS = AVERAGE(VENTAS[Vta Pzas])&amp;nbsp; - this is the average of units sold&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2COSTOTOTAL = AVERAGE(VENTAS[COSTOPROM]) - this is the price&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VTACTOTOTAL = AVERAGEX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&amp;nbsp;it want it to sum 304.37 from the 5th column,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For some reason it does not adds the results of the ids in the table if I do this for the sums instead of average it works, what am I doing wrong.&amp;nbsp; The following is the case that&amp;nbsp; works but I need averages of units and costs and then sum of totals.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VTACTOTOTAL = AVERAGEX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VTACTOTOTAL = sumX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please advise&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Jun 2021 02:14:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1926927#M41798</guid>
      <dc:creator>ooctaviano</dc:creator>
      <dc:date>2021-06-29T02:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: sum of measure (average)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1927201#M41803</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="266183" data-lia-user-login="ooctaviano" class="lia-mention lia-mention-user"&gt;ooctaviano&lt;/a&gt; , if there are more than one rows for ID, this is what you can use &lt;/P&gt;
&lt;P&gt;VTACTOTOTAL = AVERAGEX(VENTAS, VENTAS[COSTOPROM]*[1PROMVENTAS])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VTACTOTOTAL new = sumX(values(VENTAS[ID]),[VTACTOTOTAL]) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 06:09:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1927201#M41803</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-06-29T06:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: sum of measure (average)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1928780#M41869</link>
      <description>&lt;P&gt;It worked great&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 15:57:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-measure-average/m-p/1928780#M41869</guid>
      <dc:creator>ooctaviano</dc:creator>
      <dc:date>2021-06-29T15:57:03Z</dc:date>
    </item>
  </channel>
</rss>

