<?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 Dynamic Rolling 12 Months Sales Based on Selected Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877575#M185877</link>
    <description>&lt;P&gt;&lt;STRONG&gt;How to Create a Rolling 12-Month Sales Measure Based on Slicer Selection?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I’m looking for help in creating a DAX measure that calculates &lt;STRONG&gt;Rolling 12 Months (Running 12M) Sales&lt;/STRONG&gt; based on the user’s selection in a &lt;STRONG&gt;Date slicer&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirement:&lt;/STRONG&gt;&lt;BR /&gt;If the user selects &lt;STRONG&gt;Aug-2025&lt;/STRONG&gt; in the slicer, the line chart should automatically display sales from:&lt;BR /&gt;&lt;STRONG&gt;Sep-2024 to Aug-2025&lt;/STRONG&gt; (the last 12 full months based on the selected month).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model details:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I have a proper &lt;STRONG&gt;Date Table&lt;/STRONG&gt; marked as a date table.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The &lt;STRONG&gt;Sales&lt;/STRONG&gt; table is connected to the Date table through the Date column.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I need a DAX measure that dynamically returns sales for the last 12 months according to the month selected in the slicer.&lt;/P&gt;&lt;P&gt;Any guidance or sample DAX would be greatly appreciated.&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 17 Nov 2025 13:57:01 GMT</pubDate>
    <dc:creator>Chanakya_vcr</dc:creator>
    <dc:date>2025-11-17T13:57:01Z</dc:date>
    <item>
      <title>Dynamic Rolling 12 Months Sales Based on Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877575#M185877</link>
      <description>&lt;P&gt;&lt;STRONG&gt;How to Create a Rolling 12-Month Sales Measure Based on Slicer Selection?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I’m looking for help in creating a DAX measure that calculates &lt;STRONG&gt;Rolling 12 Months (Running 12M) Sales&lt;/STRONG&gt; based on the user’s selection in a &lt;STRONG&gt;Date slicer&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirement:&lt;/STRONG&gt;&lt;BR /&gt;If the user selects &lt;STRONG&gt;Aug-2025&lt;/STRONG&gt; in the slicer, the line chart should automatically display sales from:&lt;BR /&gt;&lt;STRONG&gt;Sep-2024 to Aug-2025&lt;/STRONG&gt; (the last 12 full months based on the selected month).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model details:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I have a proper &lt;STRONG&gt;Date Table&lt;/STRONG&gt; marked as a date table.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The &lt;STRONG&gt;Sales&lt;/STRONG&gt; table is connected to the Date table through the Date column.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I need a DAX measure that dynamically returns sales for the last 12 months according to the month selected in the slicer.&lt;/P&gt;&lt;P&gt;Any guidance or sample DAX would be greatly appreciated.&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 13:57:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877575#M185877</guid>
      <dc:creator>Chanakya_vcr</dc:creator>
      <dc:date>2025-11-17T13:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Rolling 12 Months Sales Based on Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877582#M185878</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654669" data-lia-user-login="Chanakya_vcr" class="lia-mention lia-mention-user"&gt;Chanakya_vcr&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Below DAX function will help in calculating last 12 months running total based on slicer selection&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rolling 12M Sales :=
VAR MaxVisibleDate =
    MAX('Date'[Date])   

RETURN
CALCULATE(
    [Total Sales],     
    DATESINPERIOD(
        'Date'[Date],
        MaxVisibleDate,
        -12,
        MONTH
    )
)
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;MaxVisibleDate captures the month selected in the slicer.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;DATESINPERIOD goes 12 months back from the last visible date.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 14:10:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877582#M185878</guid>
      <dc:creator>Abhilash_P</dc:creator>
      <dc:date>2025-11-17T14:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Rolling 12 Months Sales Based on Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877902#M185883</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below, and one of ways to achieve this is to have disconnected slicer table.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank" rel="noopener"&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;A href="https://learn.microsoft.com/en-us/dax/keepfilters-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;KEEPFILTERS function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales 12 months rolling: = 
CALCULATE (
    SUM ( sales[sales] ),
    KEEPFILTERS (
        WINDOW (
            1,
            ABS,
            12,
            ABS,
            FILTER (
                ALL ( 'calendar'[Year-Month], 'calendar'[Year-Month sort] ),
                'calendar'[Year-Month sort] &amp;lt;= MAX ( calendar_slicer[Year-Month sort] )
            ),
            ORDERBY ( 'calendar'[Year-Month sort], DESC )
        )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 18:17:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4877902#M185883</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2025-11-17T18:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Rolling 12 Months Sales Based on Selected Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4878217#M185892</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for sharing this!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 05:42:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Rolling-12-Months-Sales-Based-on-Selected-Month/m-p/4878217#M185892</guid>
      <dc:creator>Chanakya_vcr</dc:creator>
      <dc:date>2025-11-18T05:42:27Z</dc:date>
    </item>
  </channel>
</rss>

