<?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: Year-1 calc not calculating for previous year but working for current year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-1-calc-not-calculating-for-previous-year-but-working-for/m-p/2808486#M88748</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , prefer to use date table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))&lt;BR /&gt;Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))&lt;BR /&gt;week Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period, &lt;BR /&gt;Custom Period till date: &lt;A href="https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s" target="_blank"&gt;https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :&lt;A href="https://youtu.be/OBf0rjpp5Hw" target="_blank"&gt;https://youtu.be/OBf0rjpp5Hw&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4" target="_blank"&gt;https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4&lt;/A&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 12:29:27 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-09-30T12:29:27Z</dc:date>
    <item>
      <title>Year-1 calc not calculating for previous year but working for current year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-1-calc-not-calculating-for-previous-year-but-working-for/m-p/2808463#M88745</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is regarding year-1 calc. I have below calc in place&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-align-left"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;('Flsr SalesFact_6_month_stage'[Transaction_Date])),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Flsr SalesFact_6_month_stage'[Net_Sales_LC_Amount]),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt;('Flsr SalesFact_6_month_stage'[Transaction_Date], -&lt;/SPAN&gt;&lt;SPAN&gt;364&lt;/SPAN&gt;&lt;SPAN&gt;, DAY),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;('Flsr SalesFact_6_month_stage'[Calendar_Year]),&lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;('Flsr TimeDim'[Year_Of_Week]))))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-align-left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-align-left"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;This is calculating year-1 perfectly for 2021 yr, when 2022 is selected. But when I am selecting 2021, its showing blank. Ideally it should show 2020 data. Request you support on this as it is quite urgent.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-align-left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-align-left"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Thankyou!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-align-left"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Sep 2022 12:15:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-1-calc-not-calculating-for-previous-year-but-working-for/m-p/2808463#M88745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-30T12:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Year-1 calc not calculating for previous year but working for current year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-1-calc-not-calculating-for-previous-year-but-working-for/m-p/2808486#M88748</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , prefer to use date table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))&lt;BR /&gt;Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))&lt;BR /&gt;week Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period, &lt;BR /&gt;Custom Period till date: &lt;A href="https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s" target="_blank"&gt;https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :&lt;A href="https://youtu.be/OBf0rjpp5Hw" target="_blank"&gt;https://youtu.be/OBf0rjpp5Hw&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4" target="_blank"&gt;https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4&lt;/A&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 12:29:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-1-calc-not-calculating-for-previous-year-but-working-for/m-p/2808486#M88748</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-30T12:29:27Z</dc:date>
    </item>
  </channel>
</rss>

