<?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: Average Sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570186#M73375</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The same thing result&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 00:35:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-10T00:35:36Z</dc:date>
    <item>
      <title>Average Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570157#M73368</link>
      <description>&lt;P&gt;Hi Guy,&lt;/P&gt;&lt;P&gt;I'm trying to calculate current Year Avg sales. when i filter to current Year i get this value with sales for this year instead Avg. see DAX below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 00:01:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570157#M73368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T00:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570164#M73370</link>
      <description>&lt;P&gt;averagex(values([year]),calculate([sales]))&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 00:12:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570164#M73370</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-10T00:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570186#M73375</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The same thing result&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 00:35:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570186#M73375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T00:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570192#M73378</link>
      <description>&lt;P&gt;I am a little bit missunderstand,&amp;nbsp;&lt;/P&gt;&lt;P&gt;your [sales] should be a sum of somthing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say 2021 sales = 200, 2020 sales =100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you select 2021 2020, [sales] = 300, [avg sales] = 150&lt;/P&gt;&lt;P&gt;if you select 2021, [sales] = 200,&amp;nbsp; [avg sales] =200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;everytime when you select one year, it is the sales value.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 00:52:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570192#M73378</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-10T00:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570201#M73380</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp; Everything i select 2022, it give me the same as Total year instead of avg&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 00:58:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2570201#M73380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T00:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2579317#M73964</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with&amp;nbsp;&lt;SPAN&gt;vapid128 's reply. I think your average is calcualted based on years and sales measure. I think sales measure should be created by SUM() function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My Sample:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales_ = SUM('Table'[Sales])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Avg Sales = 
CALCULATE(AVERAGEX(VALUES('Calendar'[Fiscal Year]),[Sales_]))&lt;/LI-CODE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You see when I select 2022, I could only get average the same as the total in 2022. If you sum to calculate the sales, Power BI will take the same year as a whole.&lt;/P&gt;
&lt;P&gt;What kind of result do you want? If you want to get 100 as average in 2022, please do not use sales measure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Avg Sales = 
AVERAGEX('Table','Table'[Sales])&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 06:40:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales/m-p/2579317#M73964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T06:40:07Z</dc:date>
    </item>
  </channel>
</rss>

