<?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 count in each month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232043#M118635</link>
    <description>&lt;P&gt;Sure, my data looks like this, I have around 15k+ employees in each month.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this the expected result is in red box.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 03:16:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-12T03:16:24Z</dc:date>
    <item>
      <title>Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3230888#M118544</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to calculate the average of number of employee in each month.&lt;/P&gt;&lt;P&gt;Here's the example of my data, there is no duplicate of employee id in each month.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result i would like to see using Matrix visualization is in the red box&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;from the second month and so on, the formula in my excel looks like this =AVERAGE($E$2:&lt;FONT color="#FF6600"&gt;F2&lt;/FONT&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;F2&amp;nbsp;&lt;FONT color="#000000"&gt;will change based on month, (G2 in march / H2 in april so on and so forth)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;FONT color="#000000"&gt;I've tried the averagex&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'HR Report 2023'[Month]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'HR Report 2023'[Employee ID]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;FONT color="#000000"&gt;, however it only retuned the average in total (6), but I would like to see the average in each month.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;FONT color="#000000"&gt;And the result from the average will be the denominator to calculate the attrition.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;*Sending appreciation in advance* and thank you a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:39:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3230888#M118544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-11T13:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3231147#M118565</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to plot a visual with month column and a measure like:&lt;/P&gt;&lt;DIV&gt;measure =&lt;/DIV&gt;&lt;DIV&gt;DIVIDE(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;COUNTROWS(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;data,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;data[Month]&amp;lt;=MAX(data[Month])&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;MAX(data[Month])&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 May 2023 15:05:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3231147#M118565</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-11T15:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232003#M118631</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried it with my real data, and this result is still not correct.&lt;/P&gt;&lt;P&gt;(The data type for month column is text right now)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result from Power BI -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I think it is because the number in each month is divided by the number of month instead of the sum number.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 02:44:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232003#M118631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-12T02:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232025#M118634</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you update your sample dataset to better reflect your case?&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 02:57:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232025#M118634</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-12T02:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232043#M118635</link>
      <description>&lt;P&gt;Sure, my data looks like this, I have around 15k+ employees in each month.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this the expected result is in red box.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 03:16:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232043#M118635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-12T03:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232101#M118638</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I overlooked the filter context, try like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure = 
DIVIDE(
   COUNTROWS(
        FILTER(
           ALL(data), 
           data[Month]&amp;lt;=MAX(data[Month])
        )
    ),
   MAX(data[Month]) 
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tried with your original dataset, it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 04:07:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232101#M118638</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-12T04:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Average count in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232108#M118640</link>
      <description>&lt;P&gt;Yes, it worked!&lt;/P&gt;&lt;P&gt;Thank you a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 04:11:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-count-in-each-month/m-p/3232108#M118640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-12T04:11:35Z</dc:date>
    </item>
  </channel>
</rss>

