<?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 per Unit per Day in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963179#M98786</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484017" data-lia-user-login="Chrisjab28" class="lia-mention lia-mention-user"&gt;Chrisjab28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you may try&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Average per Unit per day =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;SUMMARIZE ( 'TABLE NAME', 'TABLE NAME'[Units], 'TABLE NAME'[Days] ),&lt;BR /&gt;[Total Sales]&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2022 17:22:17 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-12-12T17:22:17Z</dc:date>
    <item>
      <title>Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963134#M98783</link>
      <description>&lt;P&gt;Have anyone found an effective way to calculate the Average per Units per Day in Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following 2 steps approach unsuccessfully:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Per Unit Average Calculation&lt;UL&gt;&lt;LI&gt;Average per Unit = AVERAGEX( VALUES ('TABLE NAME'[Units), [Total Sales])&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Per Unit per Day Calculation&lt;UL&gt;&lt;LI&gt;Average per Unit per Day = AVERAGEX( VALUES ('TABLE NAME'[Days]), [Avg per Unit])&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 17:00:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963134#M98783</guid>
      <dc:creator>Chrisjab28</dc:creator>
      <dc:date>2022-12-12T17:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963179#M98786</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484017" data-lia-user-login="Chrisjab28" class="lia-mention lia-mention-user"&gt;Chrisjab28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you may try&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Average per Unit per day =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;SUMMARIZE ( 'TABLE NAME', 'TABLE NAME'[Units], 'TABLE NAME'[Days] ),&lt;BR /&gt;[Total Sales]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 17:22:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963179#M98786</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-12T17:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963245#M98790</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt; - Thank you for your reply. I did try this formula; however, it did not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 17:52:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963245#M98790</guid>
      <dc:creator>Chrisjab28</dc:creator>
      <dc:date>2022-12-12T17:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963267#M98792</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484017" data-lia-user-login="Chrisjab28" class="lia-mention lia-mention-user"&gt;Chrisjab28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is basically the same as youtr formula but using one measure&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Average per Unit per day =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;VALUES ( 'TABLE NAME'[Days] ),&lt;BR /&gt;CALCULATE ( AVERAGEX ( VALUES ( 'TABLE NAME'[Units] ), [Total Sales] ) )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 18:04:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963267#M98792</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-12T18:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963436#M98802</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt; for some reason the resulting average is not accurate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the following formula:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Avg per Unit per day = (&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;[Units]&lt;/SPAN&gt;&lt;SPAN&gt;))/&lt;/SPAN&gt;&lt;SPAN&gt;[Days], I am getting the right average per item; however the overall is still not accurate.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 19:57:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963436#M98802</guid>
      <dc:creator>Chrisjab28</dc:creator>
      <dc:date>2022-12-12T19:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963443#M98803</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484017" data-lia-user-login="Chrisjab28" class="lia-mention lia-mention-user"&gt;Chrisjab28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;= 
AVERAGEX ( 'TABLE NAME',  ( [Sales] / [Units] ) / [Days] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 10:09:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963443#M98803</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-13T10:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Average Sales per Unit per Day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963874#M98834</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484017" data-lia-user-login="Chrisjab28" class="lia-mention lia-mention-user"&gt;Chrisjab28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you calculate the average of different logics and look like a measure.&lt;BR /&gt;The calculation of the measure is directly related to the field you put above the visual. We cann see that you are using the&amp;nbsp; VALUES() function, which will only get the value of your current row. If you want to filter the entire table with the same Unit, you need to replace your function and use the FILTER() and ALLSELECTED() functions to find the value you need to average.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with your special &lt;STRONG&gt;sample data&lt;/STRONG&gt; and the &lt;STRONG&gt;desired output sample&lt;/STRONG&gt; data in the form of &lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem.&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 02:39:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Sales-per-Unit-per-Day/m-p/2963874#M98834</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-12-13T02:39:39Z</dc:date>
    </item>
  </channel>
</rss>

