<?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 Command for Rolling 3 Week Average in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4690810#M179627</link>
    <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="884738" data-lia-user-login="brockry1" class="lia-mention lia-mention-user"&gt;brockry1&lt;/a&gt;&amp;nbsp;, Just checking in—were you able to resolve the issue?&lt;BR /&gt;If one of the replies helped, please consider marking it as &lt;STRONG&gt;"Accept as Solution"&lt;/STRONG&gt; and giving a &lt;STRONG&gt;'Kudos'&lt;/STRONG&gt;. Doing so can assist other community members in finding answers more quickly.&lt;BR /&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 May 2025 12:23:37 GMT</pubDate>
    <dc:creator>v-hashadapu</dc:creator>
    <dc:date>2025-05-13T12:23:37Z</dc:date>
    <item>
      <title>Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607187#M176365</link>
      <description>&lt;P&gt;I'm looking to calculate a rolling 3 week average on my GSV for the last 3 weeks but need it to lag a week.&amp;nbsp; For the screen shot I would want an average for weeks 10,9 and 8 and when 11 is completed and 12 starts showing I would want 11, 10 and 9 and so on each time a new week starts.&amp;nbsp; In my data table I brought in the year, period and week.&amp;nbsp; I did not bring in date but if needed I can.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;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t;/TABLE&gt;</description>
      <pubDate>Wed, 12 Mar 2025 15:25:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607187#M176365</guid>
      <dc:creator>brockry1</dc:creator>
      <dc:date>2025-03-12T15:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607436#M176375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;One of ways to create a measure for finding out recent three-complete-weeks rolling average is using WINDOW DAX function in the measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;WINDOW function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&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;
&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;
&lt;LI-CODE lang="markup"&gt;GSV measure: = 
SUM( data[gsv] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;WINDOW function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;complete 3 weeks rolling average: =
VAR _today =
    TODAY ()
VAR _currentweekenddate =
    MAXX (
        FILTER ( 'calendar', 'calendar'[date] = _today ),
        'calendar'[End of Week]
    )
VAR _completeweek = _today = _currentweekenddate
RETURN
    IF (
        _completeweek,
        AVERAGEX (
            WINDOW (
                1,
                ABS,
                3,
                ABS,
                FILTER (
                    ALL ( 'calendar'[End of Week] ),
                    'calendar'[End of Week] &amp;lt;= _currentweekenddate
                ),
                ORDERBY ( 'calendar'[End of Week], DESC )
            ),
            [GSV measure:]
        ),
        AVERAGEX (
            WINDOW (
                1,
                ABS,
                3,
                ABS,
                FILTER (
                    ALL ( 'calendar'[End of Week] ),
                    'calendar'[End of Week] &amp;lt; _currentweekenddate
                ),
                ORDERBY ( 'calendar'[End of Week], DESC )
            ),
            [GSV measure:]
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 18:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607436#M176375</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2025-03-12T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607477#M176376</link>
      <description>&lt;P&gt;So I do have a Calendar Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And have a many to one relationship on date to date for my Fact Table to Calendar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So the end of week in the sample isn't working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 19:08:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607477#M176376</guid>
      <dc:creator>brockry1</dc:creator>
      <dc:date>2025-03-12T19:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607832#M176387</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I still need to understand how your calendar dimension table is structured, for instance, what column is sorted by what column.&lt;/P&gt;
&lt;P&gt;Please share your sample pbix file's link, and then, I can try to look into it.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 03:46:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4607832#M176387</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2025-03-13T03:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4608037#M176392</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="884738" data-lia-user-login="brockry1" class="lia-mention lia-mention-user"&gt;brockry1&lt;/a&gt;&amp;nbsp;please check this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rolling_3_Week_Avg =&lt;BR /&gt;VAR CurrentWeek = MAX('Sales'[Sales Week])&lt;BR /&gt;VAR LastCompletedWeek = CurrentWeek - 1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR AvailableWeeks =&lt;BR /&gt;TOPN(3,&lt;BR /&gt;FILTER(ALL('Sales'), 'Sales'[Sales Week] &amp;lt;= LastCompletedWeek),&lt;BR /&gt;'Sales'[Sales Week], DESC&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR AvgGSV =&lt;BR /&gt;AVERAGEX(AvailableWeeks, 'Sales'[GSV])&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;AvgGSV&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 07:17:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4608037#M176392</guid>
      <dc:creator>techies</dc:creator>
      <dc:date>2025-03-13T07:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4686513#M179500</link>
      <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="884738" data-lia-user-login="brockry1" class="lia-mention lia-mention-user"&gt;brockry1&lt;/a&gt;&amp;nbsp;, Thank you for reaching out to the Microsoft Community Forum.&lt;BR /&gt;&lt;BR /&gt;Please let us know if your issue is solved. If it is, consider marking the answers that helped&amp;nbsp;&lt;STRONG&gt;'Accept as Solution'&lt;/STRONG&gt;, so others with similar queries can find them easily. If not, please share the details.&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 11:23:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4686513#M179500</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-05-09T11:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4690810#M179627</link>
      <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="884738" data-lia-user-login="brockry1" class="lia-mention lia-mention-user"&gt;brockry1&lt;/a&gt;&amp;nbsp;, Just checking in—were you able to resolve the issue?&lt;BR /&gt;If one of the replies helped, please consider marking it as &lt;STRONG&gt;"Accept as Solution"&lt;/STRONG&gt; and giving a &lt;STRONG&gt;'Kudos'&lt;/STRONG&gt;. Doing so can assist other community members in finding answers more quickly.&lt;BR /&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 12:23:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4690810#M179627</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-05-13T12:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Command for Rolling 3 Week Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4695958#M179846</link>
      <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="884738" data-lia-user-login="brockry1" class="lia-mention lia-mention-user"&gt;brockry1&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I hope the information shared was helpful. If you have any additional questions or would like to explore the topic further, feel free to reach out. If any of the responses resolved your issue, please mark it "&lt;STRONG&gt;Accept as solution"&lt;/STRONG&gt; and give it a &lt;STRONG&gt;'Kudos'&lt;/STRONG&gt; to support other members in the community.&lt;BR /&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 12:10:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Command-for-Rolling-3-Week-Average/m-p/4695958#M179846</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-05-16T12:10:10Z</dc:date>
    </item>
  </channel>
</rss>

