<?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: AVERAGEX when filtered by Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/926152#M9392</link>
    <description>&lt;P&gt;You can try below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avg Daily Amount Incoming =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AVERAGEX(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;KEEPFILTERS(VALUES('Wires Table'[TransactionDate].[Date])),&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CALCULATE(SUM('Wires Table'[Amount]), 'Wires Table'[Type] = "Incoming")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;</description>
    <pubDate>Sat, 08 Feb 2020 23:55:26 GMT</pubDate>
    <dc:creator>hafizsultan</dc:creator>
    <dc:date>2020-02-08T23:55:26Z</dc:date>
    <item>
      <title>AVERAGEX when filtered by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/924245#M9245</link>
      <description>&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the function &lt;STRONG&gt;AVERAGEX&lt;/STRONG&gt; to calculate the daily average amount of incoming wires. I understand that this type of measures are meant to be used in a monthly context or upwards, but I was wondering what happens when used in a daily context.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, this measure will be used in a dashboard where I have &lt;EM&gt;Transaction Date&lt;/EM&gt; as one of the filters the users can change. I was wondering what happens to this value if the user selects a single day in the &lt;EM&gt;Transactions Date&lt;/EM&gt; filter. From what I have seen, the measure does not display the avergae for that day, nor the total (as the amount displayed is higher than the total for that day).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My function looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avg Daily Amount Incoming =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AVERAGEX(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VALUES('Wires Table'[TransactionDate].[Date]),&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CALCULATE(SUM('Wires Table'[Amount]), 'Wires Table'[Type] = "Incoming")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate any explanations as to what it is displaying and why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 16:41:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/924245#M9245</guid>
      <dc:creator>czaldumbide</dc:creator>
      <dc:date>2020-02-06T16:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGEX when filtered by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/925742#M9343</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195903" data-lia-user-login="czaldumbide" class="lia-mention lia-mention-user"&gt;czaldumbide&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Averagex is not specifically meant to be used for monthly calculation, it can calculate an average of anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To answer you question is much easier if you should some (sample) data, relationships (if any) and expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 18:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/925742#M9343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-07T18:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGEX when filtered by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/926032#M9383</link>
      <description>&lt;P&gt;Refer if this can help&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.&lt;BR /&gt;In case it does not help, please provide additional information and mark me with @ &lt;/STRONG&gt;&lt;BR /&gt;Thanks. &lt;STRONG&gt;My Recent Blog -&lt;/STRONG&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intelligence-in/ba-p/922885" target="_blank"&gt;Decoding Direct Query - Time Intelligence&lt;/A&gt; , &lt;A href="https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814" target="_blank"&gt;Winner Coloring on MAP&lt;/A&gt; , &lt;A href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank"&gt;&amp;gt;HR Analytics&lt;/A&gt; , &lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739" target="_blank"&gt;Power BI Working with Non-Standard Time&lt;/A&gt;And &lt;A href="https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601" target="_blank"&gt;Comparing Data Across Date Ranges&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/amitchandak78/" target="_blank"&gt;Connect on Linkedin&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Feb 2020 13:44:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/926032#M9383</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-02-08T13:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGEX when filtered by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/926152#M9392</link>
      <description>&lt;P&gt;You can try below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avg Daily Amount Incoming =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AVERAGEX(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;KEEPFILTERS(VALUES('Wires Table'[TransactionDate].[Date])),&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CALCULATE(SUM('Wires Table'[Amount]), 'Wires Table'[Type] = "Incoming")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;</description>
      <pubDate>Sat, 08 Feb 2020 23:55:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/926152#M9392</guid>
      <dc:creator>hafizsultan</dc:creator>
      <dc:date>2020-02-08T23:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGEX when filtered by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/932018#M9584</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;Let me give you a little bit more context. I have a table called 'Wires' that have the columns of Amount, Type and Transaction Date. I have a date table called 'Date Filter' that has a Date column. These tables are related ( One to many, single direction) by Date and Transaction Date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given this, I want to calculate the average of incoming wires. Basically I just want to sum up all Amount of type Incoming and divide by the DISTINCTCOUNT of date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Avg Daily Amount Incoming = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var totalincoming = CALCULATE(SUM('Wires'[Amount]), FILTER('Wires', 'Wires'[Type] = "Incoming"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var totaldates = DISTINCTCOUNT('Date Filter'[Date].[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return DIVIDE(totalincoming, totaldates)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Filter Date will be used as a filter in my dahsboard. So I want the result of my measure to be the average of only the selected range, or in the case of a single date selected then the total amount incoming for that date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if that's enough information. All my data si quite sensitive so it is difficult to provide sample data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 15:54:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/932018#M9584</guid>
      <dc:creator>czaldumbide</dc:creator>
      <dc:date>2020-02-13T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGEX when filtered by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/932025#M9585</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203150" data-lia-user-login="hafizsultan" class="lia-mention lia-mention-user"&gt;hafizsultan&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion. It is still not giving me the answer I'm looking for. I basically need to calculate an average that when filtered by a range of dates it divides the sum by the distinct count of dates in that range and when selected a single date it will provide me the total amount for that particular date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see the response I gave to&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;for a little bit more context.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 15:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AVERAGEX-when-filtered-by-Date/m-p/932025#M9585</guid>
      <dc:creator>czaldumbide</dc:creator>
      <dc:date>2020-02-13T15:59:12Z</dc:date>
    </item>
  </channel>
</rss>

