<?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 DAX for weighted average instead of simple average in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705772#M911</link>
    <description>&lt;P&gt;I have a table to provide "Average Value of Transaction" (AVT)&lt;/P&gt;&lt;P&gt;Although this is easy to calculate using SQL statements I want calculated using DAX because I don't want to use simple averages in my reports. Rather, I want weighted averages throughout no matter what the aggregation is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If you look at the attached image of an Xls sheet it shows the incorrect calculation on row 21, a simple average. The problem with this is that when the system aggregates it creates and average of averages.&lt;/P&gt;&lt;P&gt;I want the DAX to calculate it at any level of aggregation (week, month, store or by another dimension) according to the slicers/filters.&lt;/P&gt;&lt;P&gt;What is the best DAX to achieve this in a calculated column/measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2019 16:19:18 GMT</pubDate>
    <dc:creator>RGI</dc:creator>
    <dc:date>2019-06-03T16:19:18Z</dc:date>
    <item>
      <title>DAX for weighted average instead of simple average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705772#M911</link>
      <description>&lt;P&gt;I have a table to provide "Average Value of Transaction" (AVT)&lt;/P&gt;&lt;P&gt;Although this is easy to calculate using SQL statements I want calculated using DAX because I don't want to use simple averages in my reports. Rather, I want weighted averages throughout no matter what the aggregation is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If you look at the attached image of an Xls sheet it shows the incorrect calculation on row 21, a simple average. The problem with this is that when the system aggregates it creates and average of averages.&lt;/P&gt;&lt;P&gt;I want the DAX to calculate it at any level of aggregation (week, month, store or by another dimension) according to the slicers/filters.&lt;/P&gt;&lt;P&gt;What is the best DAX to achieve this in a calculated column/measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 16:19:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705772#M911</guid>
      <dc:creator>RGI</dc:creator>
      <dc:date>2019-06-03T16:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for weighted average instead of simple average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705792#M913</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="72365" data-lia-user-login="RGI" class="lia-mention lia-mention-user"&gt;RGI&lt;/a&gt; try this measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Avg = DIVIDE( SUM(Table[Sales]), SUM( Table[Transactions] )&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jun 2019 16:54:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705792#M913</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2019-06-03T16:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for weighted average instead of simple average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705912#M916</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507" data-lia-user-login="parry2k" class="lia-mention lia-mention-user"&gt;parry2k&lt;/a&gt;&amp;nbsp;this gives me an identical calculation for all rows.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 20:52:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/705912#M916</guid>
      <dc:creator>RGI</dc:creator>
      <dc:date>2019-06-03T20:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for weighted average instead of simple average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/706734#M928</link>
      <description>&lt;P&gt;You can create a quick measure (right click on the field you want to create the wheighted average &amp;gt; create quick measure), select Wheighted as the calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then drag the base value field from the right to the base value, the value to wheight that data on the second field and the category on the third (this could be the date or the field you will separate your info on the table / graph&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Not sure if this is what you needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 15:03:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-weighted-average-instead-of-simple-average/m-p/706734#M928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-04T15:03:27Z</dc:date>
    </item>
  </channel>
</rss>

