<?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: Previous fiscal year calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662188#M33901</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , you can use time intelligence using date table &lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"3/31"))&lt;BR /&gt;Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"3/31"))&lt;BR /&gt;This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"3/31"))&lt;BR /&gt;Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"3/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Year on Year with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=km41KfM_0uA" target="_blank"&gt;https://www.youtube.com/watch?v=km41KfM_0uA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating Financial Calendar - From Any Month &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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, 12 Feb 2021 07:03:00 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-02-12T07:03:00Z</dc:date>
    <item>
      <title>Previous fiscal year calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662153#M33900</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;below is my sample data,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to calculate gross margin for previous fiscal year (last column PY Gross margin) using dax measure.&lt;/P&gt;&lt;P&gt;April to next year march is my fiscal year period, ex 01-04-2019 to 31-03-2020.&lt;/P&gt;&lt;P&gt;I have a seperate date table, where i have my date column and extracted fiscal year from that column.&lt;/P&gt;&lt;P&gt;Gross Margin (second column in the image) is also calculated using dax measure in the sale Table.&lt;/P&gt;&lt;P&gt;I have tried using PREVIOUSYEAR and SAMEPERIODLASTYEAR dax functions, but it work fine only for calendar year.&lt;/P&gt;&lt;P&gt;Also, tried using [FY Year]=[FY YEAR]-1 and . None of them are working...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance...&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 06:47:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662153#M33900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-12T06:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Previous fiscal year calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662188#M33901</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , you can use time intelligence using date table &lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"3/31"))&lt;BR /&gt;Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"3/31"))&lt;BR /&gt;This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"3/31"))&lt;BR /&gt;Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"3/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Year on Year with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=km41KfM_0uA" target="_blank"&gt;https://www.youtube.com/watch?v=km41KfM_0uA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating Financial Calendar - From Any Month &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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, 12 Feb 2021 07:03:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662188#M33901</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-02-12T07:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Previous fiscal year calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662370#M33904</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;/P&gt;&lt;P&gt;I have used the second measure you have mentioned.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last YTD Sales = CALCULATE([Gross Margin],DATESYTD(dateadd(dates[Date],-1,Year),"3/31"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;below is my result,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have data upto yesterday ie... 11-02-2021. So, its filtering fiscal year 2019 upto feb 11,2019 and showing gross margin sum up to that date in the third row (upto feb 11,2019 gross margin sum for fiscal year 2019 is -25,14,25157 ). But I need to show previous gross margin value as -26,45,056.48 for fiscal year 2020 row.&lt;/P&gt;&lt;P&gt;how can i prevent this filtering ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 08:12:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662370#M33904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-12T08:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Previous fiscal year calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662453#M33905</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;try&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]),previousyear('Date'[Date]))&lt;/P&gt;
&lt;P&gt;Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year),"3/31"),"3/31"))&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 08:45:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/1662453#M33905</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-02-12T08:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Previous fiscal year calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/2474442#M67509</link>
      <description>&lt;P&gt;No I have the same issue but using this dax is not giving me the solution&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 09:17:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-fiscal-year-calculation/m-p/2474442#M67509</guid>
      <dc:creator>Juben_Gladson</dc:creator>
      <dc:date>2022-04-25T09:17:10Z</dc:date>
    </item>
  </channel>
</rss>

