<?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: Dax Average Days by Calendar Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2108370#M48207</link>
    <description>&lt;P&gt;&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 the quick response. I should also point out that I am using PowerPivot in Excel on a work computer and don't have access to Power BI. So I may not have the same capabilities of joining data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did look over your blogs, and they are very good. The first I am having a difficult time trying to work out. The second, seemed more straight forward. In the formula below from your blog, I am not sure what your doing with the&amp;nbsp;&lt;SPAN&gt;DIVIDE(Data[Value] exaclty, and how I would be able to use that in my data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(SUMX(SUMMARIZE(filter(CROSSJOIN('Data','Date'),'Date'[Date] &amp;gt;= 'Data'[StartDate] &amp;amp;&amp;amp; 'Date'[Date]&amp;lt;= 'Data'[EndDate]),'Data'[id],'Date'[Date],Data[Value],Data[StartDate],Data[EndDate]),DIVIDE(Data[Value],DATEDIFF(Data[StartDate],Data[EndDate],day)+1)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to attach data to this reply. The only option I see is the table. But, I did save a sample .xlxs file here if that helps.&amp;nbsp;&lt;A href="https://github.com/wshanewood/sampledata" target="_blank" rel="noopener"&gt;wshanewood/sampledata (github.com)&lt;/A&gt;&amp;nbsp;(&lt;A href="https://github.com/wshanewood/sampledata" target="_blank" rel="noopener"&gt;https://github.com/wshanewood/sampledata&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Sep 2021 14:02:21 GMT</pubDate>
    <dc:creator>woodrow912</dc:creator>
    <dc:date>2021-09-30T14:02:21Z</dc:date>
    <item>
      <title>Dax Average Days by Calendar Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2106414#M48131</link>
      <description>&lt;P&gt;Hello everyone. I am pretty new to Dax and have run into an issue with a formula I have been tryiung to work out. My data has personal information, or I would share it here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table titled Data with an [Event Date] which is the start date and [Event End], which is the end date. What I would like to do is create a pivot chart displaying every day, and the average days (start date to date on chart) for events where the start date is before the date (day) on the chart and the end date is after the date (day) on the chart. I am looking for what the average days was for each day in the chart. I hope that makes sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a screen shot of what i want the final product to resemble.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a date table and tried to get the average for each date in the date calendar, which seemed to work using the formula below. I converted the Event date to a number in order to work this out. But if I do it this way,&amp;nbsp;i can't create slicers from my data, which I really need to do.&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;=&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;VAR&lt;/SPAN&gt; &lt;SPAN class="cf2"&gt;_StartDate&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;= &lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Data[Event Date Num]),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;FILTER&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;('Data','Data'[Event Date] &amp;lt;= &lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;('Datetable'[Date]) &amp;amp;&amp;amp; 'Data'[Next Event]&amp;gt;= &lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;('Datetable'[Date]&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;)) &lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;RETURN&lt;/SPAN&gt; &lt;SPAN class="cf1"&gt;value&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Datetable[Date])-&lt;/SPAN&gt;&lt;SPAN class="cf2"&gt;_StartDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf2"&gt;I could really use some help here, and again, i apologize if its a little unclear.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf2"&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&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;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 04:27:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2106414#M48131</guid>
      <dc:creator>woodrow912</dc:creator>
      <dc:date>2021-09-30T04:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Average Days by Calendar Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2107829#M48179</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="329391" data-lia-user-login="woodrow912" class="lia-mention lia-mention-user"&gt;woodrow912&lt;/a&gt; , &lt;/P&gt;
&lt;P&gt;Check if two of my blogs can help&lt;/P&gt;
&lt;P&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;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to divide/distribute values between start date or end date or count days across months/days: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 09:27:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2107829#M48179</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-09-30T09:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Average Days by Calendar Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2108370#M48207</link>
      <description>&lt;P&gt;&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 the quick response. I should also point out that I am using PowerPivot in Excel on a work computer and don't have access to Power BI. So I may not have the same capabilities of joining data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did look over your blogs, and they are very good. The first I am having a difficult time trying to work out. The second, seemed more straight forward. In the formula below from your blog, I am not sure what your doing with the&amp;nbsp;&lt;SPAN&gt;DIVIDE(Data[Value] exaclty, and how I would be able to use that in my data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(SUMX(SUMMARIZE(filter(CROSSJOIN('Data','Date'),'Date'[Date] &amp;gt;= 'Data'[StartDate] &amp;amp;&amp;amp; 'Date'[Date]&amp;lt;= 'Data'[EndDate]),'Data'[id],'Date'[Date],Data[Value],Data[StartDate],Data[EndDate]),DIVIDE(Data[Value],DATEDIFF(Data[StartDate],Data[EndDate],day)+1)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to attach data to this reply. The only option I see is the table. But, I did save a sample .xlxs file here if that helps.&amp;nbsp;&lt;A href="https://github.com/wshanewood/sampledata" target="_blank" rel="noopener"&gt;wshanewood/sampledata (github.com)&lt;/A&gt;&amp;nbsp;(&lt;A href="https://github.com/wshanewood/sampledata" target="_blank" rel="noopener"&gt;https://github.com/wshanewood/sampledata&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 14:02:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Average-Days-by-Calendar-Date/m-p/2108370#M48207</guid>
      <dc:creator>woodrow912</dc:creator>
      <dc:date>2021-09-30T14:02:21Z</dc:date>
    </item>
  </channel>
</rss>

