<?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: Weekly group average in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467546#M27794</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="266864" data-lia-user-login="sdgiss" class="lia-mention lia-mention-user"&gt;sdgiss&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get an accurate answer, you'd need to show your data model, the tables relevant to these calculations and their relationships. If dRace is a dimension table, you have to do the distinctcount on the fact table where the info on the races is, since that will (supposedly) be filtered by the week number. Assuming [Total Dist] works correctly, try something like:&lt;/P&gt;
&lt;P&gt;Measure =&lt;/P&gt;
&lt;P&gt;DIVIDE( [Total Dist], DISTINCTCOUNT(&lt;FONT color="#FF0000"&gt;FactTable&lt;/FONT&gt;[RacerID])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Nov 2020 06:58:06 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2020-11-01T06:58:06Z</dc:date>
    <item>
      <title>Weekly group average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467514#M27790</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hoping someone can help me with calculating a weekly average for a group. The following returns the sum of the weekly totals for all of the racers who were competing in that respective week (which is the result I get when dropping [Total Dist] into the pivot table by itself). The desired value is next to Fall-Week01 for both 2019 and 2020. I believe I need a count of athletes per week to get to the outcome I desire, but that is proving difficult as well. The second measure is close but I get the same racer count (total of all racers in database) for each week even though the total number of racers per week never tops 24 in 2020.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, in advance, for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;Weekly average dist:=&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;VALUES&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(dDate[WeekNum]),[Total Dist])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;&lt;!-- StartFragment  --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;Weekly Average Dist-distinctcount:=&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;VALUES&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(dDate[WeekNum]), [Total Dist]),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(dRacer[Racer]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;&lt;!-- EndFragment  --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!-- EndFragment  --&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 03:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467514#M27790</guid>
      <dc:creator>sdgiss</dc:creator>
      <dc:date>2020-11-01T03:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly group average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467546#M27794</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="266864" data-lia-user-login="sdgiss" class="lia-mention lia-mention-user"&gt;sdgiss&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get an accurate answer, you'd need to show your data model, the tables relevant to these calculations and their relationships. If dRace is a dimension table, you have to do the distinctcount on the fact table where the info on the races is, since that will (supposedly) be filtered by the week number. Assuming [Total Dist] works correctly, try something like:&lt;/P&gt;
&lt;P&gt;Measure =&lt;/P&gt;
&lt;P&gt;DIVIDE( [Total Dist], DISTINCTCOUNT(&lt;FONT color="#FF0000"&gt;FactTable&lt;/FONT&gt;[RacerID])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 06:58:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467546#M27794</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-11-01T06:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly group average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467958#M27825</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;! Your answer makes complete sense and have should have seen this when posting my question. It is such a simple solution, yet my narrow view of how this should work was blocking my ability to think clearly. I've gotten so caught up in always using my dimension tables that I forget about how, in some instances, they don't apply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great week!&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 19:02:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-group-average/m-p/1467958#M27825</guid>
      <dc:creator>sdgiss</dc:creator>
      <dc:date>2020-11-01T19:02:26Z</dc:date>
    </item>
  </channel>
</rss>

