<?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: Rolling 6 months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3968881#M153913</link>
    <description>&lt;P&gt;Second request: Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2024 13:18:55 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-06-03T13:18:55Z</dc:date>
    <item>
      <title>Rolling 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3935787#M153084</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for looking at my post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below code (Thanks to Forum community). May i know how can i change this to show 6 months rolling average please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final result = VAR _date = SELECTEDVALUE ( 'Table'[Due Date] ) VAR _partmonth = CALCULATE ( COUNT ( 'Table'[Due Date] ), FILTER ( ALLSELECTED ( 'Table' ), YEAR('Table'[Due Date])=YEAR(_date) &amp;amp;&amp;amp; MONTH ( 'Table'[Due Date] ) = MONTH ( _date ) &amp;amp;&amp;amp; 'Table'[Time to Close] = 2 ) ) VAR _month = CALCULATE ( COUNT ( 'Table'[Due Date] ), FILTER ( ALLSELECTED ( 'Table' ), YEAR('Table'[Due Date])=YEAR(_date) &amp;amp;&amp;amp; MONTH ( 'Table'[Due Date] ) = MONTH ( _date ) ) ) RETURN IF ( ISBLANK ( _partmonth ), 0, DIVIDE ( _partmonth, _month ) )&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 11:40:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3935787#M153084</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2024-05-21T11:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3937385#M153118</link>
      <description>&lt;P&gt;That formula only tells you how far you got in a particular month&amp;nbsp; (how many days in you are), and it's rather inefficient.&amp;nbsp; You could have just used the day number and divide it by the count of days in the month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A 6 month rolling average would not make sense in this context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 00:34:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3937385#M153118</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-22T00:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3963012#M153746</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="413988" data-lia-user-login="jimpatel" class="lia-mention lia-mention-user"&gt;jimpatel&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can try to use the following measure formulas if it suitable for your requirement:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula =
VAR _currDate =
    MAX ( 'Table'[Due Date] )
VAR summary =
    SUMMARIZE (
        FILTER (
            ALLSELECTED ( 'Table' ),
            [Due Date]
                &amp;gt;= DATE ( YEAR ( _currDate ), MONTH ( _currDate ) - 6, DAY ( _currDate ) )
                &amp;amp;&amp;amp; [Due Date] &amp;lt;= _currDate
        ),
        [Due Date],
        "Div",
            VAR cDate =
                MAX ( 'Table'[Due Date] )
            RETURN
                CALCULATE (
                    DIVIDE (
                        CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Time to Close] = 2 ),
                        COUNTROWS ( 'Table' )
                    ),
                    ALLSELECTED ( 'Table' ),
                    YEAR ( 'Table'[Due Date] ) = YEAR ( cDate )
                        &amp;amp;&amp;amp; MONTH ( 'Table'[Due Date] ) = MONTH ( cDate )
                )
    )
RETURN
    AVERAGEX ( summary, [Div] )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 06:04:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3963012#M153746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-31T06:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3968194#M153893</link>
      <description>&lt;P&gt;Thanks a lot for your effort and time. But this formula does not work well for me. When i apply above formula to get last 6 months rolling average, i am getting below answers which is not right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot&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>Mon, 03 Jun 2024 09:26:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3968194#M153893</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2024-06-03T09:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3968881#M153913</link>
      <description>&lt;P&gt;Second request: Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 13:18:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-6-months/m-p/3968881#M153913</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-03T13:18:55Z</dc:date>
    </item>
  </channel>
</rss>

