<?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 Cumulative comparison today to same period last year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-comparison-today-to-same-period-last-year/m-p/1002714#M12724</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make a comparison of the cumulative sales of this year until today compared to the cumulative sales of last year until the same week and weekday. I've got a measure that calculates it for this year until today and this works like a charm. Now I would like to create the same measure but for the previous year to show the cumulative total until the same week and same weekday as today, but I cannot make it work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The working measure is as follows:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cumulatief Total LCY = 
VAR GroterDanVandaag = CALCULATE( LASTDATE(Shipment[Loading date]); ALL(Shipment))

RETURN
IF( SELECTEDVALUE( CalendarTable[DateKey] ) &amp;gt; GroterDanVandaag; BLANK();
    CALCULATE ( [Som Total LCY] ;
    FILTER (
        ALLSELECTED( CalendarTable[DateKey] );
        CalendarTable[DateKey] &amp;lt;= MAX ( CalendarTable[DateKey] )
    );
    FILTER (
        ALLSELECTED ( CalendarTable[ISOYear] );
        CalendarTable[ISOYear] = MAX ( CalendarTable[ISOYear] )
    )
) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create the same for last year?&lt;/P&gt;</description>
    <pubDate>Wed, 01 Apr 2020 13:08:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-01T13:08:28Z</dc:date>
    <item>
      <title>Cumulative comparison today to same period last year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-comparison-today-to-same-period-last-year/m-p/1002714#M12724</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make a comparison of the cumulative sales of this year until today compared to the cumulative sales of last year until the same week and weekday. I've got a measure that calculates it for this year until today and this works like a charm. Now I would like to create the same measure but for the previous year to show the cumulative total until the same week and same weekday as today, but I cannot make it work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The working measure is as follows:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cumulatief Total LCY = 
VAR GroterDanVandaag = CALCULATE( LASTDATE(Shipment[Loading date]); ALL(Shipment))

RETURN
IF( SELECTEDVALUE( CalendarTable[DateKey] ) &amp;gt; GroterDanVandaag; BLANK();
    CALCULATE ( [Som Total LCY] ;
    FILTER (
        ALLSELECTED( CalendarTable[DateKey] );
        CalendarTable[DateKey] &amp;lt;= MAX ( CalendarTable[DateKey] )
    );
    FILTER (
        ALLSELECTED ( CalendarTable[ISOYear] );
        CalendarTable[ISOYear] = MAX ( CalendarTable[ISOYear] )
    )
) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create the same for last year?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 13:08:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-comparison-today-to-same-period-last-year/m-p/1002714#M12724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-01T13:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative comparison today to same period last year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-comparison-today-to-same-period-last-year/m-p/1003097#M12735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try using SAMEPRIODLASTYEAR Dax:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 16:01:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-comparison-today-to-same-period-last-year/m-p/1003097#M12735</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-04-01T16:01:09Z</dc:date>
    </item>
  </channel>
</rss>

