<?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 year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186365#M18655</link>
    <description>&lt;P&gt;If you are looking for running total then you could try something like this:&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;Running Total 2 = 
VAR MaxDateInFilterContext = MAX ( Dates[Date] )
VAR MaxYearInFilterContext = YEAR ( MaxDateInFilterContext )
RETURN
    CALCULATE (
        [Total Sales],
        FILTER (
            ALL ( Dates ),
            Dates[Date] &amp;lt;= MaxDateInFilterContext
                &amp;amp;&amp;amp; Dates[Calendar Year Number] = MaxYearInFilterContext
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Running Total =
CALCULATE ( [Total Sales], DATESYTD ( Dates[Date] ) )&lt;/LI-CODE&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>Sat, 27 Jun 2020 07:45:40 GMT</pubDate>
    <dc:creator>AntrikshSharma</dc:creator>
    <dc:date>2020-06-27T07:45:40Z</dc:date>
    <item>
      <title>Rolling year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186349#M18650</link>
      <description>&lt;P&gt;Hi guys I need your help with a calculation for a rolling year.&lt;/P&gt;&lt;P&gt;Here is the calculation: F% = A(currentmonth going back a year) + B (Full 12 months) - C(full 12 months) + D(full 12 months) - E(For selected month)&lt;/P&gt;&lt;P&gt;This calculation should be dynamic that you can display values for the 12 months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently when I do it it displays the answer at a total level and not the individual months&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2020 06:58:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186349#M18650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-27T06:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186350#M18651</link>
      <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2020 06:14:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186350#M18651</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-27T06:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186365#M18655</link>
      <description>&lt;P&gt;If you are looking for running total then you could try something like this:&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;Running Total 2 = 
VAR MaxDateInFilterContext = MAX ( Dates[Date] )
VAR MaxYearInFilterContext = YEAR ( MaxDateInFilterContext )
RETURN
    CALCULATE (
        [Total Sales],
        FILTER (
            ALL ( Dates ),
            Dates[Date] &amp;lt;= MaxDateInFilterContext
                &amp;amp;&amp;amp; Dates[Calendar Year Number] = MaxYearInFilterContext
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Running Total =
CALCULATE ( [Total Sales], DATESYTD ( Dates[Date] ) )&lt;/LI-CODE&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>Sat, 27 Jun 2020 07:45:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-year/m-p/1186365#M18655</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-06-27T07:45:40Z</dc:date>
    </item>
  </channel>
</rss>

