<?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 sales from the last 24 months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676067#M142734</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;I don't see why that makes a difference how many dates are in the Dates table. What matters is what date is in context at the time and for dates beyond today, you can just add a condition where if that is the case, return BLANK.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 16:41:13 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-02-02T16:41:13Z</dc:date>
    <item>
      <title>Rolling sales from the last 24 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3675818#M142705</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;management wants to see the accumulated sales until now vs the accumulated sales from the last two years in a graphic displaying the last 24 months.&lt;BR /&gt;&lt;BR /&gt;I have written this measure for the rolling numbers, thinking that MAX Date was related to our current time (today). Instead, Max date looks at row level and so it computes rolling numbers backwards, which is not what we want.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sales cumulated rolling =&lt;/P&gt;&lt;P&gt;CALCULATE (&lt;BR /&gt;[Total Sales],&lt;BR /&gt;DATESINPERIOD ( 'Datetable'[Date],&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;MAX ( 'Datetable'[Date] ),&lt;/FONT&gt;&lt;BR /&gt;-24,&lt;BR /&gt;MONTH&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, I will see the accumulated sales with May 2022 as a label but including numbers from 2020. What I need is basically the raw numbers since January 2022, accumulated.&lt;BR /&gt;&lt;BR /&gt;I have looked around, but I am lost. Can someone help here?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Pauline.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 14:42:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3675818#M142705</guid>
      <dc:creator>Berl21</dc:creator>
      <dc:date>2024-02-02T14:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling sales from the last 24 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3675858#M142712</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;Try this, just use SUMX instead of AVERAGEX:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Better-Rolling-Average/m-p/2897874#M911" target="_blank"&gt;Better Rolling Average - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;div data-video-id="https://youtu.be/TkrHfRFjpSc" data-video-remote-vid="https://youtu.be/TkrHfRFjpSc" class="lia-video-container lia-media-is-center lia-media-size-medium"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTkrHfRFjpSc%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTkrHfRFjpSc&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTkrHfRFjpSc%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:10:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3675858#M142712</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-02-02T15:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling sales from the last 24 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676055#M142732</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I still have the issue with the backward calculation. Don't know how to get around this, maybe the issue is that the date table should be switched for another one.&lt;BR /&gt;&lt;BR /&gt;The last available date in this table is 31st of December 2030. Instead of today.&lt;BR /&gt;&lt;BR /&gt;Hence, this can't work either:&lt;BR /&gt;VAR __DATE_PERIOD =&lt;BR /&gt;DATESBETWEEN(&lt;BR /&gt;'Datetable'[Date].[Date],&lt;BR /&gt;STARTOFMONTH(DATEADD(__LAST_DATE, -24, MONTH)),&lt;BR /&gt;ENDOFMONTH(DATEADD(__LAST_DATE, 0, MONTH))&lt;BR /&gt;&lt;BR /&gt;How can I replace these lines?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:33:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676055#M142732</guid>
      <dc:creator>Berl21</dc:creator>
      <dc:date>2024-02-02T16:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling sales from the last 24 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676067#M142734</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;I don't see why that makes a difference how many dates are in the Dates table. What matters is what date is in context at the time and for dates beyond today, you can just add a condition where if that is the case, return BLANK.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:41:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676067#M142734</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-02-02T16:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling sales from the last 24 months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676193#M142744</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386899" data-lia-user-login="Berl21" class="lia-mention lia-mention-user"&gt;Berl21&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can share pbix file with any sensitive data removed that will help. This is what you can try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a Measure(Assuming you have date field in your visual)&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//This variable will capture the current date(current filter context).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_dt&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//In CALCULATE first you will remove any filter on date table column. Then provide a new filter for sales calculation, Date &amp;gt;= 24 months prior from date in current filter context and less than equal to date in current filter context.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( [Total Sales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates[column in visual]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;EDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_dt&lt;/SPAN&gt;&lt;SPAN&gt;, -&lt;/SPAN&gt;&lt;SPAN&gt;24&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;_dt&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If this is not what you want, please explain.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Feb 2024 18:17:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-sales-from-the-last-24-months/m-p/3676193#M142744</guid>
      <dc:creator>talespin</dc:creator>
      <dc:date>2024-02-02T18:17:12Z</dc:date>
    </item>
  </channel>
</rss>

