<?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: Growth - Same period last year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2866048#M92367</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;luanamoreschi,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Can you please try:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Last Year QTD Sales =
   CALCULATE(
      [QTD Sales],
      DATEADD('calendar'[ Date],-1,YEAR)
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2865206#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Best regards&lt;/DIV&gt;&lt;DIV class=""&gt;Michael&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 21:57:04 GMT</pubDate>
    <dc:creator>Mikelytics</dc:creator>
    <dc:date>2022-10-26T21:57:04Z</dc:date>
    <item>
      <title>Growth - Same period last year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2865206#M92317</link>
      <description>&lt;P&gt;Hello Everyone!&lt;/P&gt;&lt;P&gt;I'm facing some difficulties in calculating the YoY Growth (sharing QTD sales vs the same period last year)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm using the formula below to calculate the QTD Orders from this year, and the result is coming right&lt;/P&gt;&lt;P&gt;QTD Sales = CALCULATE(COUNT('Orders'[Order Date]),DATESQTD(('Calendar'[ Date])))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The problem is in the formula that calculates the same period from last year:&lt;/P&gt;&lt;P&gt;Last Year QTD Orders = calculate(count(Orders'[Order Date]),DATESQTD(DATEADD('calendar'[ Date],-1,YEAR)))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It's bringing the result from the WHOLE quarter last year, not from the same period as this year (QTD)&lt;BR /&gt;&lt;BR /&gt;I've tried to calculate using the SAMEPERIODLASTYEAR and I got the same results.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I don't know if the problem is in my calendar, which was built this way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calendar =&lt;BR /&gt;var mindate = year(MIN('Orders'[Order Date]))&lt;BR /&gt;var maxdate = YEAR(MAX('Orders'[Order Date]))&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(&lt;BR /&gt;FILTER(&lt;BR /&gt;CALENDARAUTO(),&lt;BR /&gt;YEAR([Date]) &amp;gt;= mindate &amp;amp;&amp;amp; YEAR([Date]) &amp;lt;= maxdate&lt;BR /&gt;),&lt;BR /&gt;"Year", YEAR([Date]),&lt;BR /&gt;"Month", FORMAT([Date],"mmmm"),&lt;BR /&gt;"Month_Number", MONTH([Date]),&lt;BR /&gt;"Quarter", FORMAT([Date], "\QQ"&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already marked the calendar as date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much in advance&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 14:39:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2865206#M92317</guid>
      <dc:creator>luanamoreschi</dc:creator>
      <dc:date>2022-10-26T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Growth - Same period last year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2865439#M92331</link>
      <description>&lt;P&gt;Did you try&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;Last Year QTD Sales =
   CALCULATE(
      [QTD Sales],
      SAMEPERIODLASTYEAR('Calendar'[Date])
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2865439#M92331</guid>
      <dc:creator>lukiz84</dc:creator>
      <dc:date>2022-10-26T15:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Growth - Same period last year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2866048#M92367</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;luanamoreschi,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Can you please try:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Last Year QTD Sales =
   CALCULATE(
      [QTD Sales],
      DATEADD('calendar'[ Date],-1,YEAR)
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2865206#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Best regards&lt;/DIV&gt;&lt;DIV class=""&gt;Michael&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 21:57:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Growth-Same-period-last-year/m-p/2866048#M92367</guid>
      <dc:creator>Mikelytics</dc:creator>
      <dc:date>2022-10-26T21:57:04Z</dc:date>
    </item>
  </channel>
</rss>

