<?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: Calculate the measure for the previous analysis week in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-measure-for-the-previous-analysis-week/m-p/3058336#M105589</link>
    <description>&lt;P&gt;I solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is necessary to create a classifier, for using OFFSET in the ORDERBY, I concatenated the year of the end of the week from the column date with the week of the year of the end of the week from the column date and then used offset:&lt;/P&gt;&lt;P&gt;CALCULATE([Final Value],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;OFFSET(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; -1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLSELECTED(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'd_Calendar'[Concat(Year-Week(EndofWeek)],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'd_Calendar'[Week analyze]),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORDERBY('d_Calendar'[Concat (Year-Week(EndofWeek)]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;d_calendar below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 16:00:37 GMT</pubDate>
    <dc:creator>daniel_19</dc:creator>
    <dc:date>2023-02-02T16:00:37Z</dc:date>
    <item>
      <title>Calculate the measure for the previous analysis week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-measure-for-the-previous-analysis-week/m-p/3057816#M105548</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How can I calculate the "Value Begin" measure when it always has the same value as the "Final Value" of the previous week of analysis.&lt;/P&gt;&lt;P&gt;In this example the "Final value" is 80,30,30 for the analysis week 26 Dec to 01 Jan and for categories x,y,z. So the "Value Begin" for the following analysis week (02 Jan to 08 Jan) should be 80,30,30 for category x,y,z.&lt;/P&gt;&lt;P&gt;How to do this in Dax?&lt;/P&gt;&lt;P&gt;I tried with OFFSET&lt;/P&gt;&lt;P&gt;CALCULATE([Final Value],&lt;BR /&gt;OFFSET(&lt;BR /&gt;-1,&lt;BR /&gt;ALLSELECTED(d_calendar[Analyze week]),&lt;BR /&gt;GROUPBY(d_calendar[Analyze week]))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;but doesnt work, returned blank&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 12:43:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-measure-for-the-previous-analysis-week/m-p/3057816#M105548</guid>
      <dc:creator>daniel_19</dc:creator>
      <dc:date>2023-02-02T12:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the measure for the previous analysis week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-measure-for-the-previous-analysis-week/m-p/3058336#M105589</link>
      <description>&lt;P&gt;I solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is necessary to create a classifier, for using OFFSET in the ORDERBY, I concatenated the year of the end of the week from the column date with the week of the year of the end of the week from the column date and then used offset:&lt;/P&gt;&lt;P&gt;CALCULATE([Final Value],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;OFFSET(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; -1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLSELECTED(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'd_Calendar'[Concat(Year-Week(EndofWeek)],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'd_Calendar'[Week analyze]),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORDERBY('d_Calendar'[Concat (Year-Week(EndofWeek)]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;d_calendar below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 16:00:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-measure-for-the-previous-analysis-week/m-p/3058336#M105589</guid>
      <dc:creator>daniel_19</dc:creator>
      <dc:date>2023-02-02T16:00:37Z</dc:date>
    </item>
  </channel>
</rss>

