<?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 12month sum in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2618986#M76217</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405247" data-lia-user-login="StevenCollins" class="lia-mention lia-mention-user"&gt;StevenCollins&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, you want to calculate sum value of the rolling 12 months based on the date you selected in the slicer, but the formula only take the selected month into calculation, you should use the&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/removefilters-function-dax" target="_blank"&gt;removefilters&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;function in the formula.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I create a sample.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Modify the measure formula like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    SUM ( Combined[Sales History (Value)] ),
    DATESINPERIOD ( 'Combined'[Date], MAX ( Combined[Date] ), -12, MONTH ),
    REMOVEFILTERS ( Combined[Report Month] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Use the Report Month column in the slicer and get the correct result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2022 07:14:52 GMT</pubDate>
    <dc:creator>v-yanjiang-msft</dc:creator>
    <dc:date>2022-07-05T07:14:52Z</dc:date>
    <item>
      <title>Rolling 12month sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2600365#M75158</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Im trying to calculate a days cover stock position, which divides the last months stock volume by the rolling 12 months of sales.&lt;/P&gt;&lt;P&gt;When dispalying the results in a table/graph with historical time intellegence, i get the correct answer. However, when slicing the table/graph to view fewer month periods, the rolling 12 month calculation only sums the cumulative values for the months displayed rather than the full 12 months thats required for the dependant days cover calculation.&lt;/P&gt;&lt;P&gt;Can anyone please help with a rolling 12 month DAX formula that cumulates a full 12 months regardless of what time duration is being sliced?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 10:53:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2600365#M75158</guid>
      <dc:creator>StevenCollins</dc:creator>
      <dc:date>2022-06-24T10:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12month sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2600435#M75159</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;YOU CAN USE THE "CALCULATE AND ALL" FUNCTIONS TOGETHER TO KEEP DATA RESULTS INDEPENDENT OF SLICERS&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 11:29:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2600435#M75159</guid>
      <dc:creator>thiagocamillo</dc:creator>
      <dc:date>2022-06-24T11:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12month sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2600504#M75160</link>
      <description>&lt;P&gt;Thanks, but im unsure this will work, as the filters are required to determine the rolling 12 months.&lt;/P&gt;&lt;P&gt;Below is the formula im using, perhaps you can advise where ALL would be positioned please?:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Combined[Sales History (Value)]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Combined[Report Month]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Combined[Report Month]&lt;/SPAN&gt;&lt;SPAN&gt;),-&lt;/SPAN&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jun 2022 11:59:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2600504#M75160</guid>
      <dc:creator>StevenCollins</dc:creator>
      <dc:date>2022-06-24T11:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12month sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2618986#M76217</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405247" data-lia-user-login="StevenCollins" class="lia-mention lia-mention-user"&gt;StevenCollins&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, you want to calculate sum value of the rolling 12 months based on the date you selected in the slicer, but the formula only take the selected month into calculation, you should use the&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/removefilters-function-dax" target="_blank"&gt;removefilters&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;function in the formula.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I create a sample.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Modify the measure formula like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    SUM ( Combined[Sales History (Value)] ),
    DATESINPERIOD ( 'Combined'[Date], MAX ( Combined[Date] ), -12, MONTH ),
    REMOVEFILTERS ( Combined[Report Month] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Use the Report Month column in the slicer and get the correct result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 07:14:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2618986#M76217</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-07-05T07:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12month sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2621871#M76399</link>
      <description>&lt;P&gt;Thank you, that worked perfectly&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 08:55:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-12month-sum/m-p/2621871#M76399</guid>
      <dc:creator>StevenCollins</dc:creator>
      <dc:date>2022-07-06T08:55:34Z</dc:date>
    </item>
  </channel>
</rss>

