<?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: Running Total lastyear in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2313606#M57589</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;keeps returning blank&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 16:45:44 GMT</pubDate>
    <dc:creator>Paulo123</dc:creator>
    <dc:date>2022-02-01T16:45:44Z</dc:date>
    <item>
      <title>Running Total lastyear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2310597#M57417</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;hi, I wanted the measure to return the accumulated value of the last year. but when I filter for example the year 2021, it should return the accumulated value for the year 2020 but it returns blank. The measure:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LY_V_LI_ACUM = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dados[Mês]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[LY_VL]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;Dados&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;Dados[Data Valor]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALENDARIO[Date]&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>Mon, 31 Jan 2022 11:51:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2310597#M57417</guid>
      <dc:creator>Paulo123</dc:creator>
      <dc:date>2022-01-31T11:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total lastyear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2310673#M57422</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I recommend creating a normal RT calculation like:&amp;nbsp;&lt;BR /&gt;RT =&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;Dados[Mês]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Dados&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Dados[Data Valor]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALENDARIO[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Then create LY measure like this:&lt;BR /&gt;[RT LY] =&amp;nbsp;&lt;BR /&gt;CALCULATE([RT],SAMEPERIODLASTYEAR(CALENDARIO[Date]))&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 31 Jan 2022 12:20:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2310673#M57422</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-31T12:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total lastyear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2313606#M57589</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;keeps returning blank&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 16:45:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2313606#M57589</guid>
      <dc:creator>Paulo123</dc:creator>
      <dc:date>2022-02-01T16:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total lastyear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2313630#M57591</link>
      <description>&lt;P&gt;Sorry about that, Here is a revised version:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;RT =&lt;BR /&gt;var maxdate =&amp;nbsp;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALENDARIO[Date]&lt;/SPAN&gt;&lt;SPAN&gt;) return&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;Dados[Mês]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( CALENDARIO&lt;/SPAN&gt;&lt;SPAN&gt;), CALENDARIO&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt;= maxdate&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Also for future reference check this article by SQLBI about the topic:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/computing-running-totals-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/computing-running-totals-in-dax/&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Feb 2022 17:03:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2313630#M57591</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-02-01T17:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total lastyear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2322350#M58030</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352525" data-lia-user-login="Paulo123" class="lia-mention lia-mention-user"&gt;Paulo123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, It's hard to give an accurate formula without detail information. &lt;SPAN&gt;SAMEPERIODLASTYEAR&amp;nbsp;&lt;/SPAN&gt; works well in my model. Please refer to this pbix&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 06:15:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-lastyear/m-p/2322350#M58030</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2022-02-07T06:15:29Z</dc:date>
    </item>
  </channel>
</rss>

