<?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: Need Last Week data using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2575369#M73723</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="342195" data-lia-user-login="Sudharshan1919" class="lia-mention lia-mention-user"&gt;Sudharshan1919&lt;/a&gt;&amp;nbsp;This is easiest if you create a Sequential week column. Then you don't have to worry about years and years having 52 or 53 weeks in them.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Sequential/m-p/380231#M116" target="_blank"&gt;Sequential - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 13:32:23 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2022-06-13T13:32:23Z</dc:date>
    <item>
      <title>Need Last Week data using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2575339#M73719</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data of showing day wise incidents (ticket). We are maintaining this things in excel sheet. My Requirement is to show the &lt;FONT color="#FF6600"&gt;last weeks data&lt;/FONT&gt; &lt;STRONG&gt;(not last 7 days).&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help how do we write the formula to get the last week data. Day begins from Mon to Sun.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sudharshan&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 13:20:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2575339#M73719</guid>
      <dc:creator>Sudharshan1919</dc:creator>
      <dc:date>2022-06-13T13:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need Last Week data using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2575369#M73723</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="342195" data-lia-user-login="Sudharshan1919" class="lia-mention lia-mention-user"&gt;Sudharshan1919&lt;/a&gt;&amp;nbsp;This is easiest if you create a Sequential week column. Then you don't have to worry about years and years having 52 or 53 weeks in them.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Sequential/m-p/380231#M116" target="_blank"&gt;Sequential - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 13:32:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2575369#M73723</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-06-13T13:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need Last Week data using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2582577#M74150</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="342195" data-lia-user-login="Sudharshan1919" class="lia-mention lia-mention-user"&gt;Sudharshan1919&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you just want to compare data from the same year:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    SUM ( 'table'[value] ),
    FILTER (
        ALLSELECTED ( 'table' ),
        YEAR ( 'table'[date] ) = YEAR ( MAX ( 'table'[date] ) )
            &amp;amp;&amp;amp; WEEKNUM ( 'table'[date], 2 ) = WEEKNUM ( MAX ( 'table'[date] ), 2 )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;If you just want to compare data across years, you will need to create a year_week column then create a rank column based on it.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;year_week = YEAR('table'[date])*100+WEEKNUM('table'[date],2)

_rank = RANKX('table','table'[year_week],,ASC,Dense)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    SUM ( 'table'[value] ),
    FILTER ( ALLSELECTED ( 'table' ), 'table'[_rank] = MAX ( 'table'[_rank] ) - 1 )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 09:01:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Last-Week-data-using-DAX/m-p/2582577#M74150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T09:01:54Z</dc:date>
    </item>
  </channel>
</rss>

